aboutsummaryrefslogtreecommitdiffstats
path: root/bot/constants.py
diff options
context:
space:
mode:
authorGravatar Sebastiaan Zeeff <[email protected]>2020-12-01 22:22:29 +0100
committerGravatar Sebastiaan Zeeff <[email protected]>2020-12-01 22:22:29 +0100
commitcb418139b19aae38d384746ee0d7e149094c05b1 (patch)
tree8ef8859e91ddc14929f7c3551fe3d0e2715850d6 /bot/constants.py
parentAdd function that allows tasks to sleep until AoC (diff)
Let status update task sleep until the AoC starts
I've refactored the rich presence countdown task by making it hibernate until 2 hours before the next Advent of Code starts if the task starts up before the event has started. This ensures that the task will run when the event starts and allows it to countdown to the first challenge. After the event for the configured Advent of Code year has finished, the task will terminate. This also means that the task will terminate immediately in the year following the currently configured Advent of Code; it will only start hibernating again once we configure the bot for the next event. No unnecessary, year-long hibernation.
Diffstat (limited to 'bot/constants.py')
0 files changed, 0 insertions, 0 deletions