Refactor stream_notifications

This commit is contained in:
2024-11-19 14:24:19 +01:00
parent 2f1e2c0ffa
commit 0495bf8dbb

View File

@@ -104,14 +104,9 @@ class TwitchService:
) )
logger.info("Twitch service started") logger.info("Twitch service started")
while True: await eventsub._keep_loop_alive()
await sleep(0.1)
finally: finally:
await eventsub.unsubscribe_all()
await eventsub.stop() await eventsub.stop()
await sleep(10)
await self.twitch.close() await self.twitch.close()
raise RuntimeError("Twitch service stopped") raise RuntimeError("Twitch service stopped")