bug: fix a bug with some missing temperatures in graphql.
This commit is contained in:
@@ -562,8 +562,11 @@ class BOSMiner(BaseMiner):
|
|||||||
|
|
||||||
board = data.hashboards[_id]
|
board = data.hashboards[_id]
|
||||||
board.hashrate = round(hb["realHashrate"]["mhs1M"] / 1000000, 2)
|
board.hashrate = round(hb["realHashrate"]["mhs1M"] / 1000000, 2)
|
||||||
board.temp = round(hb["temperatures"][0]["degreesC"])
|
temps = hb["temperatures"]
|
||||||
board.chip_temp = round(hb["temperatures"][1]["degreesC"])
|
if len(temps) > 0:
|
||||||
|
board.temp = round(hb["temperatures"][0]["degreesC"])
|
||||||
|
if len(temps) > 1:
|
||||||
|
board.chip_temp = round(hb["temperatures"][1]["degreesC"])
|
||||||
board.chips = hb["hwDetails"]["chips"]
|
board.chips = hb["hwDetails"]["chips"]
|
||||||
board.missing = False
|
board.missing = False
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user