Use a more sane live streams limit
This commit is contained in:
1 parent
0cb2ae7fcd
commit
cb5db158ec
1 file changed
+3
-1
@@ -28,6 +28,8 @@ from constants import (
|
|||||||
GQL_OPERATIONS,
|
GQL_OPERATIONS,
|
||||||
DROPS_ENABLED_TAG,
|
DROPS_ENABLED_TAG,
|
||||||
TERMINATED_STR,
|
TERMINATED_STR,
|
||||||
|
MAX_WEBSOCKETS,
|
||||||
|
WS_TOPICS_LIMIT,
|
||||||
GQLOperation,
|
GQLOperation,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -431,7 +433,7 @@ class Twitch:
|
|||||||
async def get_live_streams(
|
async def get_live_streams(
|
||||||
self, games: Collection[Game], tag_ids: List[str]
|
self, games: Collection[Game], tag_ids: List[str]
|
||||||
) -> Dict[Game, List[Channel]]:
|
) -> Dict[Game, List[Channel]]:
|
||||||
limit = 100
|
limit = min(int((MAX_WEBSOCKETS * WS_TOPICS_LIMIT) // len(games)), 100)
|
||||||
live_streams = {}
|
live_streams = {}
|
||||||
for game in games:
|
for game in games:
|
||||||
response = await self.gql_request(
|
response = await self.gql_request(
|
||||||
|
|||||||
Reference in new issue
Block a user