mirror of
https://github.com/kurbezz/discord-bot.git
synced 2025-12-06 15:15:37 +01:00
Fix
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from asyncio import sleep, gather
|
||||
from asyncio import sleep, gather, wait, FIRST_COMPLETED, create_task
|
||||
import logging
|
||||
from typing import NoReturn, Literal
|
||||
|
||||
@@ -180,6 +180,14 @@ class TwitchService:
|
||||
|
||||
streamers = await StreamerConfigRepository.all()
|
||||
|
||||
await wait(
|
||||
[
|
||||
create_task(cls._start_for_streamer(streamer))
|
||||
for streamer in streamers
|
||||
],
|
||||
return_when=FIRST_COMPLETED
|
||||
)
|
||||
|
||||
await gather(
|
||||
*[cls._start_for_streamer(streamer) for streamer in streamers]
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user