diff options
author | 2019-12-03 00:02:37 +1000 | |
---|---|---|
committer | 2019-12-03 00:02:37 +1000 | |
commit | b61f78193b325e978c3bb12200c1caeea9cbbac4 (patch) | |
tree | 14a64725b050a316256457bef265a8e5657d8142 /bot/seasons/christmas/adventofcode.py | |
parent | Adds the monsterbio command (#303) (diff) | |
parent | Delete whitespaces (diff) |
Cancel season related tasks on cog unload (#320)
Cancel season related tasks on cog unload
Diffstat (limited to 'bot/seasons/christmas/adventofcode.py')
-rw-r--r-- | bot/seasons/christmas/adventofcode.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bot/seasons/christmas/adventofcode.py b/bot/seasons/christmas/adventofcode.py index 3750964a..fe2fa956 100644 --- a/bot/seasons/christmas/adventofcode.py +++ b/bot/seasons/christmas/adventofcode.py @@ -407,6 +407,11 @@ class AdventOfCode(commands.Cog): else: self.cached_private_leaderboard = await AocPrivateLeaderboard.from_url() + def cog_unload(self) -> None: + """Cancel season-related tasks on cog unload.""" + self.countdown_task.cancel() + self.status_task.cancel() + class AocMember: """Object representing the Advent of Code user.""" |