Extract webserver metrics into a separate class to avoid passing it into every API call. Change the display to requests per hour rather than just last request time. Add SSE and telnet client connected count.

This commit is contained in:
Ian Renton
2026-09-11 22:32:04 +01:00
parent 4a09e46fe0
commit 7c458a8c5b
25 changed files with 161 additions and 230 deletions
+5
View File
@@ -26,6 +26,11 @@ class SSEBroadcaster:
with self._lock:
self._handlers.discard(handler)
@property
def client_count(self) -> int:
with self._lock:
return len(self._handlers)
def publish(self, value):
self._loop.add_callback(self._broadcast, value)