Handle GQL service timeout
This commit is contained in:
1 parent
504c6b06c0
commit
bcb5bfab36
1 file changed
+6
@@ -1279,6 +1279,12 @@ class Twitch:
|
|||||||
continue
|
continue
|
||||||
gql_logger.debug(f"GQL Response: {response_json}")
|
gql_logger.debug(f"GQL Response: {response_json}")
|
||||||
if "errors" in response_json and response_json["errors"]:
|
if "errors" in response_json and response_json["errors"]:
|
||||||
|
if (
|
||||||
|
"message" in response_json["errors"]
|
||||||
|
and response_json["errors"]["message"] == "service timeout"
|
||||||
|
):
|
||||||
|
await asyncio.sleep(1)
|
||||||
|
continue
|
||||||
raise MinerException(f"GQL error: {response_json['errors']}")
|
raise MinerException(f"GQL error: {response_json['errors']}")
|
||||||
return response_json
|
return response_json
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user