Compare commits

..

4 Commits

Author SHA1 Message Date
UpstreamData
418c62b40d version: bump version number 2022-11-14 13:50:28 -07:00
UpstreamData
198a480c35 bug: fix bug with read timeout not being caught when sending graphql query 2022-11-14 13:49:57 -07:00
UpstreamData
2d4bf4e847 version: bump version number 2022-11-14 11:20:54 -07:00
UpstreamData
774e3d1a62 bug: fix wattage not setting correctly for some BOS+ miners with issues. 2022-11-14 11:20:27 -07:00
2 changed files with 4 additions and 4 deletions

View File

@@ -83,7 +83,7 @@ class BOSMiner(BaseMiner):
d = await client.post(url, json={"query": query})
if d.status_code == 200:
return d.json()
except httpx.ReadError:
except (httpx.ReadError, httpx.ReadTimeout):
return None
return None
@@ -484,7 +484,7 @@ class BOSMiner(BaseMiner):
wattage_limit = tuner[0].get("PowerLimit")
if wattage_limit:
data.wattage_limit = wattage_limit
if wattage:
if wattage is not None:
data.wattage = wattage
chain_status = tuner[0].get("TunerChainStatus")
@@ -609,7 +609,7 @@ class BOSMiner(BaseMiner):
try:
data.wattage = query_data["bosminer"]["info"]["workSolver"]["power"]["approxConsumptionW"]
except (TypeError, KeyError, ValueError, IndexError):
pass
data.wattage = 0
try:
data.wattage_limit = query_data["bosminer"]["info"]["workSolver"]["power"]["limitW"]
except (TypeError, KeyError, ValueError, IndexError):

View File

@@ -1,6 +1,6 @@
[tool.poetry]
name = "pyasic"
version = "0.21.10"
version = "0.21.12"
description = "A set of modules for interfacing with many common types of ASIC bitcoin miners, using both their API and SSH."
authors = ["UpstreamData <brett@upstreamdata.ca>"]
repository = "https://github.com/UpstreamData/pyasic"