refactor: round hashrate to 2 decimals for influx
This commit is contained in:
committed by
Brett Rowan
parent
2e192a1536
commit
5bb04b2af4
@@ -381,7 +381,7 @@ class MinerData(BaseModel):
|
||||
return f'{key}="{value}"'
|
||||
|
||||
def serialize_algo_hash_rate(key: str, value: AlgoHashRateType) -> str:
|
||||
return f"{key}={float(value)}"
|
||||
return f"{key}={round(float(value), 2)}"
|
||||
|
||||
def serialize_list(key: str, value: list[Any]) -> str | None:
|
||||
if len(value) == 0:
|
||||
|
||||
@@ -84,7 +84,7 @@ class HashBoard(BaseModel):
|
||||
return f'{key}="{value}"'
|
||||
|
||||
def serialize_algo_hash_rate(key: str, value: AlgoHashRateType) -> str:
|
||||
return f"{key}={float(value)}"
|
||||
return f"{key}={round(float(value), 2)}"
|
||||
|
||||
def serialize_bool(key: str, value: bool):
|
||||
return f"{key}={value}"
|
||||
|
||||
Reference in New Issue
Block a user