Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2a49b89849 | ||
|
|
4ecd135734 | ||
|
|
836defc216 | ||
|
|
f8f777b5b5 | ||
|
|
b15e0a7363 | ||
|
|
5c1d06f743 |
@@ -71,11 +71,11 @@ class MinerData:
|
|||||||
model: str = "Unknown"
|
model: str = "Unknown"
|
||||||
hostname: str = "Unknown"
|
hostname: str = "Unknown"
|
||||||
hashrate: float = 0
|
hashrate: float = 0
|
||||||
left_board_hashrate: float = 0
|
left_board_hashrate: float = 0.0
|
||||||
center_board_hashrate: float = 0
|
center_board_hashrate: float = 0.0
|
||||||
right_board_hashrate: float = 0
|
right_board_hashrate: float = 0.0
|
||||||
temperature_avg: int = field(init=False)
|
temperature_avg: int = field(init=False)
|
||||||
env_temp: float = 0
|
env_temp: float = 0.0
|
||||||
left_board_temp: int = 0
|
left_board_temp: int = 0
|
||||||
left_board_chip_temp: int = 0
|
left_board_chip_temp: int = 0
|
||||||
center_board_temp: int = 0
|
center_board_temp: int = 0
|
||||||
@@ -190,16 +190,17 @@ class MinerData:
|
|||||||
tags = ["ip", "mac", "model", "hostname"]
|
tags = ["ip", "mac", "model", "hostname"]
|
||||||
for attribute in self:
|
for attribute in self:
|
||||||
if attribute in tags:
|
if attribute in tags:
|
||||||
tag_data.append(f'{attribute}="{self[attribute]}"')
|
escaped_data = self[attribute].replace(" ", "\\ ")
|
||||||
|
tag_data.append(f"{attribute}={escaped_data}")
|
||||||
continue
|
continue
|
||||||
if isinstance(self[attribute], str):
|
if isinstance(self[attribute], str):
|
||||||
field_data.append(f'{attribute}="{self[attribute]}"')
|
field_data.append(f'{attribute}="{self[attribute]}"')
|
||||||
continue
|
continue
|
||||||
if isinstance(self[attribute], bool):
|
if isinstance(self[attribute], bool):
|
||||||
field_data.append(f"{attribute}={str(self[attribute])}")
|
field_data.append(f"{attribute}={str(self[attribute]).lower()}")
|
||||||
continue
|
continue
|
||||||
if isinstance(self[attribute], int):
|
if isinstance(self[attribute], int):
|
||||||
field_data.append(f"{attribute}={self[attribute]}i")
|
field_data.append(f"{attribute}={self[attribute]}")
|
||||||
continue
|
continue
|
||||||
if isinstance(self[attribute], float):
|
if isinstance(self[attribute], float):
|
||||||
field_data.append(f"{attribute}={self[attribute]}")
|
field_data.append(f"{attribute}={self[attribute]}")
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "pyasic"
|
name = "pyasic"
|
||||||
version = "0.16.4"
|
version = "0.16.7"
|
||||||
description = "A set of modules for interfacing with many common types of ASIC bitcoin miners, using both their API and SSH."
|
description = "A set of modules for interfacing with many common types of ASIC bitcoin miners, using both their API and SSH."
|
||||||
authors = ["UpstreamData <brett@upstreamdata.ca>"]
|
authors = ["UpstreamData <brett@upstreamdata.ca>"]
|
||||||
repository = "https://github.com/UpstreamData/pyasic"
|
repository = "https://github.com/UpstreamData/pyasic"
|
||||||
|
|||||||
Reference in New Issue
Block a user