diff options
| author | 2020-12-01 22:09:57 +0100 | |
|---|---|---|
| committer | 2020-12-01 22:09:57 +0100 | |
| commit | 82a600747e4142f1c7073c2be57c520be6455a87 (patch) | |
| tree | 1b9113956e08dea6e8a87b2eb4f5418d77419260 /bot/constants.py | |
| parent | Fix 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