Differentiate mnt task logging points claim vs reload
This commit is contained in:
1 parent
f5b1cb46aa
commit
5bf56f7c0d
1 file changed
+9
-3
@@ -1040,11 +1040,17 @@ class Twitch:
|
|||||||
trigger_cleanup = True
|
trigger_cleanup = True
|
||||||
self._mnt_triggers.popleft()
|
self._mnt_triggers.popleft()
|
||||||
next_trigger = switch_trigger
|
next_trigger = switch_trigger
|
||||||
|
if next_trigger == next_period:
|
||||||
|
trigger_type: str = "Reload"
|
||||||
|
elif trigger_cleanup:
|
||||||
|
trigger_type = "Cleanup"
|
||||||
|
else:
|
||||||
|
trigger_type = "Points"
|
||||||
logger.log(
|
logger.log(
|
||||||
CALL,
|
CALL,
|
||||||
(
|
(
|
||||||
f"Maintenance task waiting until: {next_trigger.astimezone().strftime('%X')} "
|
"Maintenance task waiting until: "
|
||||||
f"({'Cleanup' if trigger_cleanup else 'Reload'})"
|
f"{next_trigger.astimezone().strftime('%X')} ({trigger_type})"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
await asyncio.sleep((next_trigger - now).total_seconds())
|
await asyncio.sleep((next_trigger - now).total_seconds())
|
||||||
@@ -1063,7 +1069,7 @@ class Twitch:
|
|||||||
except Exception:
|
except Exception:
|
||||||
pass # we intentionally silently skip anything else
|
pass # we intentionally silently skip anything else
|
||||||
# this triggers this task restart every (up to) 60 minutes
|
# this triggers this task restart every (up to) 60 minutes
|
||||||
logger.log(CALL, "Maintenance task requests reload")
|
logger.log(CALL, "Maintenance task requests a reload")
|
||||||
self.change_state(State.INVENTORY_FETCH)
|
self.change_state(State.INVENTORY_FETCH)
|
||||||
|
|
||||||
def can_watch(self, channel: Channel) -> bool:
|
def can_watch(self, channel: Channel) -> bool:
|
||||||
|
|||||||
Reference in new issue
Block a user