added restarting and rebooting miner backends

This commit is contained in:
UpstreamData
2022-05-06 15:52:21 -06:00
parent 8215d33241
commit 267c388a95
6 changed files with 82 additions and 21 deletions

View File

@@ -114,10 +114,13 @@ class BMMiner(BaseMiner):
pool_data.append({"url": pool["URL"], "user": pool["User"], "pwd": "123"})
return pool_data
async def reboot(self) -> None:
async def reboot(self) -> bool:
logging.debug(f"{self}: Sending reboot command.")
await self.send_ssh_command("reboot")
_ret = await self.send_ssh_command("reboot")
logging.debug(f"{self}: Reboot command completed.")
if isinstance(_ret, str):
return True
return False
async def get_data(self):
data = {