bug: fix is_mining for some miners.
This commit is contained in:
@@ -451,3 +451,15 @@ class AntminerOld(CGMiner):
|
|||||||
return False if int(web_get_conf["bitmain-work-mode"]) == 1 else True
|
return False if int(web_get_conf["bitmain-work-mode"]) == 1 else True
|
||||||
except LookupError:
|
except LookupError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
api_summary = None
|
||||||
|
try:
|
||||||
|
api_summary = await self.api.summary()
|
||||||
|
except APIError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
if api_summary is not None:
|
||||||
|
if not api_summary == {}:
|
||||||
|
return True
|
||||||
|
else:
|
||||||
|
return False
|
||||||
|
|||||||
@@ -192,3 +192,12 @@ class AntminerOldWebAPI(BaseWebAPI):
|
|||||||
|
|
||||||
async def set_miner_conf(self, conf: dict) -> dict:
|
async def set_miner_conf(self, conf: dict) -> dict:
|
||||||
return await self.send_command("set_miner_conf", **conf)
|
return await self.send_command("set_miner_conf", **conf)
|
||||||
|
|
||||||
|
async def stats(self) -> dict:
|
||||||
|
return await self.send_command("miner_stats")
|
||||||
|
|
||||||
|
async def summary(self) -> dict:
|
||||||
|
return await self.send_command("miner_summary")
|
||||||
|
|
||||||
|
async def pools(self) -> dict:
|
||||||
|
return await self.send_command("miner_pools")
|
||||||
|
|||||||
Reference in New Issue
Block a user