added the basics of the recording functionality, just need to write out to file.

This commit is contained in:
UpstreamData
2022-06-02 11:08:14 -06:00
parent 7dfe25e5d2
commit e7d269008c
7 changed files with 281 additions and 139 deletions

View File

@@ -1,4 +1,5 @@
from dataclasses import dataclass, field, asdict
from datetime import datetime
@dataclass
@@ -32,6 +33,7 @@ class MinerData:
"""
ip: str
datetime: datetime = None
model: str = "Unknown"
hostname: str = "Unknown"
hashrate: float = 0
@@ -60,6 +62,9 @@ class MinerData:
pool_2_url: str = ""
pool_2_user: str = ""
def __post_init__(self):
self.datetime = datetime.now()
@property
def total_chips(self): # noqa - Skip PyCharm inspection
return self.right_chips + self.center_chips + self.left_chips