updated some formatting and improved pool return format

This commit is contained in:
UpstreamData
2022-05-05 13:02:00 -06:00
parent ac3ff7a63e
commit 801cfc4ff8
7 changed files with 51 additions and 33 deletions

View File

@@ -262,7 +262,7 @@ class BOSMiner(BaseMiner):
hr = summary.get("SUMMARY")
if hr:
if len(hr) > 0:
hr = hr[0].get("MHS av")
hr = hr[0].get("MHS 5s")
if hr:
data["Hashrate"] = round(hr / 1000000, 2)
@@ -300,6 +300,8 @@ class BOSMiner(BaseMiner):
quota = f"{pool_1_quota}/{pool_2_quota}"
if pool_1:
pool_1 = pool_1.replace("stratum+tcp://", "")
pool_1 = pool_1.replace("stratum2+tcp://", "")
data["Pool 1"] = pool_1
if pool_1_user:
@@ -307,6 +309,8 @@ class BOSMiner(BaseMiner):
data["Pool User"] = pool_1_user
if pool_2:
pool_2 = pool_2.replace("stratum+tcp://", "")
pool_2 = pool_2.replace("stratum2+tcp://", "")
data["Pool 2"] = pool_2
if pool_2_user: