aboutsummaryrefslogtreecommitdiffstats
path: root/bot/constants.py
diff options
context:
space:
mode:
authorGravatar Sebastiaan Zeeff <[email protected]>2020-12-01 22:09:57 +0100
committerGravatar Sebastiaan Zeeff <[email protected]>2020-12-01 22:09:57 +0100
commit82a600747e4142f1c7073c2be57c520be6455a87 (patch)
tree1b9113956e08dea6e8a87b2eb4f5418d77419260 /bot/constants.py
parentFix daily stats by converting day, star to str (diff)
Add function that allows tasks to sleep until AoC
Our Advent of Code background tasks were written in such a way that they relied on the extension being loaded in December and only in December. However, since the deseasonification, the extension is loaded prior to December, with some commands being locked to that month with a check instead. This meant that our background tasks immediately cancelled themselves, as they observed themselves to be running outside of the boundaries of the event. As there was no mechanism for starting them back up again, these tasks would only start running again after redeployment of Sir Lancebot. To solve this issue, I've added a helper function that allows tasks to wait until a x hours before the event starts. This allows them to wake up in time to prepare for the release of the first puzzle.
Diffstat (limited to 'bot/constants.py')
0 files changed, 0 insertions, 0 deletions