Try start before unsubscribe

This commit is contained in:
2024-11-17 22:50:15 +01:00
parent 248cf86768
commit 2a04cb1db3

View File

@@ -71,13 +71,13 @@ class TwitchService:
streamers = await StreamerConfigRepository.all() streamers = await StreamerConfigRepository.all()
try: try:
eventsub.start()
logger.info("Unsubscribe from all events...") logger.info("Unsubscribe from all events...")
await eventsub.unsubscribe_all() await eventsub.unsubscribe_all()
await sleep(5) await sleep(5)
logger.info("Unsubscribe from all events done") logger.info("Unsubscribe from all events done")
eventsub.start()
logger.info("Subscribe to events...") logger.info("Subscribe to events...")
await gather( await gather(
*[self.subscribe_to_streamer(eventsub, streamer) for streamer in streamers] *[self.subscribe_to_streamer(eventsub, streamer) for streamer in streamers]