change hashrate data to 1m as it seems more consistent, and add get_data to web monitor

This commit is contained in:
UpstreamData
2022-05-26 11:12:31 -06:00
parent 3451b88669
commit 41433bcaf5
5 changed files with 12 additions and 122 deletions

View File

@@ -156,7 +156,7 @@ class BMMiner(BaseMiner):
hr = summary.get("SUMMARY")
if hr:
if len(hr) > 0:
hr = hr[0].get("GHS av")
hr = hr[0].get("GHS 1m")
if hr:
data.hashrate = round(hr / 1000, 2)

View File

@@ -279,7 +279,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 1m")
if hr:
data.hashrate = round(hr / 1000000, 2)

View File

@@ -125,7 +125,7 @@ class BTMiner(BaseMiner):
summary_data = summary.get("SUMMARY")
if summary_data:
if len(summary_data) > 0:
hr = summary_data[0].get("MHS av")
hr = summary_data[0].get("MHS 1m")
if hr:
data.hashrate = round(hr / 1000000, 2)

View File

@@ -135,7 +135,7 @@ class CGMiner(BaseMiner):
hr = summary.get("SUMMARY")
if hr:
if len(hr) > 0:
hr = hr[0].get("GHS av")
hr = hr[0].get("GHS 1m")
if hr:
data.hashrate = round(hr / 1000, 2)