Use a more sane live streams limit

This commit is contained in:
DevilXD
2021-12-16 19:30:56 +01:00
parent 0cb2ae7fcd
commit cb5db158ec

View File

@@ -28,6 +28,8 @@ from constants import (
GQL_OPERATIONS,
DROPS_ENABLED_TAG,
TERMINATED_STR,
MAX_WEBSOCKETS,
WS_TOPICS_LIMIT,
GQLOperation,
)
@@ -431,7 +433,7 @@ class Twitch:
async def get_live_streams(
self, games: Collection[Game], tag_ids: List[str]
) -> Dict[Game, List[Channel]]:
limit = 100
limit = min(int((MAX_WEBSOCKETS * WS_TOPICS_LIMIT) // len(games)), 100)
live_streams = {}
for game in games:
response = await self.gql_request(