This commit is contained in:
2025-03-18 19:29:08 +01:00
parent c511192f83
commit 19e2207bc2

View File

@@ -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]
)