feature: Finish fixing get and send config handlers for miners.
This commit is contained in:
@@ -38,16 +38,13 @@ class CGMinerT3HPlus(CGMiner, T3HPlus):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
async def get_config(self, api_pools: dict = None) -> MinerConfig:
|
async def get_config(self, api_pools: dict = None) -> MinerConfig:
|
||||||
if not api_pools:
|
# get pool data
|
||||||
try:
|
try:
|
||||||
api_pools = await self.api.pools()
|
pools = await self.api.pools()
|
||||||
except APIError as e:
|
except APIError:
|
||||||
logging.warning(e)
|
return self.config
|
||||||
|
|
||||||
if api_pools:
|
self.config = MinerConfig.from_api(pools)
|
||||||
if "POOLS" in api_pools.keys():
|
|
||||||
cfg = MinerConfig().from_api(api_pools["POOLS"])
|
|
||||||
self.config = cfg
|
|
||||||
return self.config
|
return self.config
|
||||||
|
|
||||||
async def reboot(self) -> bool:
|
async def reboot(self) -> bool:
|
||||||
|
|||||||
Reference in New Issue
Block a user