improved bosminer get config again, created set_config_format

This commit is contained in:
UpstreamData
2021-10-12 14:31:55 -06:00
parent a07a5e55e8
commit 46f158b398
2 changed files with 9 additions and 2 deletions

View File

@@ -2,6 +2,7 @@ from miners import BaseMiner
from API.bosminer import BOSMinerAPI
import asyncssh
import toml
import time
class BOSminer(BaseMiner):
@@ -62,3 +63,8 @@ class BOSminer(BaseMiner):
toml_data = toml.loads(await file.read())
self.config = toml_data
return toml_data
async def set_config_format(self):
self.config['format']['generator'] = 'upstream_data_configurator'
self.config['format']['timestamp'] = int(time.time())
return self.config