minor: reformat a bunch of files to try to make backends more cohesive, add static dict for get_data instead of using inspect, refactored graphql into a bosminer web API, and added supports_autotuning and supports_shutdown attributes to miners.

This commit is contained in:
UpstreamData
2023-03-28 11:39:03 -06:00
parent 63c8fe6868
commit aa6dc74471
239 changed files with 2106 additions and 4833 deletions

View File

@@ -19,8 +19,8 @@ from typing import List, Union
from pyasic.errors import APIError
from pyasic.miners import AnyMiner
from pyasic.miners.btc._backends import ( # noqa - Ignore access to _module
X19,
from pyasic.miners.backends import ( # noqa - Ignore access to _module
AntminerModern,
BOSMiner,
BTMiner,
)
@@ -103,7 +103,7 @@ class _MinerPhaseBalancer:
self.miners[str(miner.ip)]["tune"] = True
self.miners[str(miner.ip)]["shutdown"] = True
self.miners[str(miner.ip)]["max"] = 3600
elif isinstance(miner, X19):
elif isinstance(miner, AntminerModern):
self.miners[str(miner.ip)]["tune"] = False
self.miners[str(miner.ip)]["shutdown"] = True
self.miners[str(miner.ip)]["max"] = 3600