added the basics of the recording functionality, just need to write out to file.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user