This commit is contained in:
1 parent
cd7ddd3cf6
commit
89621bc7c3
15 files changed
+289
-74
No files matched your search
@@ -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 = {
|
||||
|
||||
Reference in new issue
Block a user