We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e500569 commit ab9a831Copy full SHA for ab9a831
twitch.py
@@ -1513,7 +1513,8 @@ async def gql_request(
1513
self, ops: GQLOperation | list[GQLOperation]
1514
) -> JsonType | list[JsonType]:
1515
gql_logger.debug(f"GQL Request: {ops}")
1516
- while True:
+ backoff = ExponentialBackoff(maximum=60)
1517
+ for delay in backoff:
1518
try:
1519
auth_state = await self.get_auth()
1520
async with self.request(
@@ -1552,7 +1553,8 @@ async def gql_request(
1552
1553
break
1554
else:
1555
return orig_response
- await asyncio.sleep(1)
1556
+ await asyncio.sleep(delay)
1557
+ raise MinerException()
1558
1559
def _merge_data(self, primary_data: JsonType, secondary_data: JsonType) -> JsonType:
1560
merged = {}
0 commit comments