mirror of
https://github.com/rangermix/TwitchDropsMiner.git
synced 2026-06-08 13:24:35 +00:00
Stop the maintenance task from executing triggers...;
if we're reloading the whole inventory anyway
This commit is contained in:
@@ -973,6 +973,7 @@ class Twitch:
|
||||
now = datetime.now(timezone.utc)
|
||||
next_period = now + max_period
|
||||
while True:
|
||||
# exit if there's no need to repeat the loop
|
||||
now = datetime.now(timezone.utc)
|
||||
if now >= next_period:
|
||||
break
|
||||
@@ -983,6 +984,10 @@ class Twitch:
|
||||
self._mnt_triggers.popleft()
|
||||
next_trigger = switch_trigger
|
||||
await asyncio.sleep((next_trigger - now).total_seconds())
|
||||
# exit after waiting, before the actions
|
||||
now = datetime.now(timezone.utc)
|
||||
if now >= next_period:
|
||||
break
|
||||
if trigger_switch:
|
||||
self.change_state(State.CHANNEL_SWITCH)
|
||||
# ensure that we don't have unclaimed points bonus
|
||||
|
||||
Reference in New Issue
Block a user