stop db event listener on cog unload

This commit is contained in:
Leander Furumo committed 2024-05-08 00:05:14 +02:00
1 parent 100aaf26ba
commit 98006a51dc
1 file changed
+3
+3
View File
@@ -98,6 +98,9 @@ class Galtinn(commands.Cog):
await conn.add_listener("galtinn_auth_complete", process_notification)
while True:
if not self.bot.get_cog("Galtinn"):
self.bot.logger.info("Galtinn cog unload detected. Stopping db listener")
break
await asyncio.sleep(1)
async def fetch_galtinn_users(