Stop presenting stale data as live, and back off broken devices
- readings.py: PowerReadings.total now sums the known parts (None only when nothing is known), with a complete property saying whether it under-counts; the snapshot exposes it as partial and the web UI marks it with a tilde. - display/service.py: telemetry older than 15 s is drawn as -- instead of re-rendering frozen readings as if they were current. - sensors.py: Commander PRO last-known RPMs expire after 10 s instead of feeding the power model forever (empty list = unknown); a runtime MSR failure backs off 15 s instead of re-opening PawnIO every second; GPU NVML reconnects back off 10 s instead of nvmlInit() every second, and the sample-buffer timestamp resets on a driver-reset reconnect. - control.py: CpuTemperature read failures back off 15 s instead of churning the MSR handle every poll.
This commit is contained in:
1 parent
538a464257
commit
9036c6e734
6 files changed
+46
-7
No files matched your search
@@ -229,6 +229,8 @@ class CaseFanGroup:
|
||||
class CpuTemperature:
|
||||
"""CPU package temperature averaged over CPU_AVERAGE readings; None while unavailable."""
|
||||
|
||||
RETRY_SECONDS = 15.0 # pause after a read failure, so a lost PawnIO device is not re-opened every poll
|
||||
|
||||
def __init__(self, factory=IntelPackage):
|
||||
self._factory = factory
|
||||
self.pkg: IntelPackage | None = None
|
||||
@@ -249,6 +251,7 @@ class CpuTemperature:
|
||||
except OSError as e:
|
||||
log.warning("CPU temperature read failed, will retry: %s", e)
|
||||
self.close()
|
||||
self._retry_at = now + self.RETRY_SECONDS
|
||||
if temp is None:
|
||||
self._recent.clear()
|
||||
return None
|
||||
|
||||
Reference in new issue
Block a user