Simplify status interface
Deploy Solar Relay / deploy (push) Successful in 1m2s

This commit is contained in:
franzz committed 2026-11-02 23:14:13 +01:00
1 parent cd7ddd3cf6
commit 89621bc7c3
15 files changed
+289 -74

No files matched your search

+1 -1
View File
@@ -109,7 +109,7 @@ class StatusServer:
now = datetime.now(timezone.utc)
attempt = archive["last_observation"]
age = (now.timestamp() * 1000 - milliseconds(attempt)) / 1000 if attempt else None
errors = list(archive["last_errors"])
errors = [source for source in archive["last_errors"] if source != "meter"]
success = self.store.last_success(self.config.collector.source_id)
status = "waiting" if age is None else "stale" if age > max(90, self.config.collector.poll_interval_seconds * 3) or age < -90 else "partial" if errors or success != attempt else "ok"
body = {