added custom command functionality

This commit is contained in:
UpstreamData
2022-05-06 16:01:50 -06:00
parent 267c388a95
commit c01908ff9a
5 changed files with 30 additions and 1 deletions

View File

@@ -85,6 +85,8 @@ class BMMiner(BaseMiner):
try:
# run the command and get the result
result = await conn.run(cmd)
result = result.stdout
except Exception as e:
# if the command fails, log it
logging.warning(f"{self} command {cmd} error: {e}")

View File

@@ -34,6 +34,7 @@ class BOSMiner(BaseMiner):
try:
# run the command and get the result
result = await conn.run(cmd)
result = result.stdout
except Exception as e:
# if the command fails, log it
logging.warning(f"{self} command {cmd} error: {e}")

View File

@@ -50,6 +50,7 @@ class CGMiner(BaseMiner):
for i in range(3):
try:
result = await conn.run(cmd)
result = result.stdout
except Exception as e:
print(f"{cmd} error: {e}")
if i == 3: