bug: fix check light not responding properly from graphQL.

This commit is contained in:
Upstream Data
2022-11-13 17:06:35 -07:00
parent b70fed40c8
commit 766fc4efed

View File

@@ -276,8 +276,11 @@ class BOSMiner(BaseMiner):
return self.light
# get light through GraphQL
if data := await self.send_graphql_query("{bos {faultLight}}"):
try:
self.light = data["data"]["bos"]["faultLight"]
return self.light
except KeyError or ValueError or TypeError:
pass
# get light via ssh if that fails (10x slower)
data = (