Updates server logic
All checks were successful
Build and Push Multi-Platform Docker Image / build-and-push (push) Successful in 15s
All checks were successful
Build and Push Multi-Platform Docker Image / build-and-push (push) Successful in 15s
This commit is contained in:
@@ -77,6 +77,7 @@ async def broadcast_labels_periodically():
|
||||
# 1) clear stale clients
|
||||
for pid, last_ts in list(CLIENT_LABELS_TS.items()):
|
||||
if now - last_ts > STALE_TIMEOUT:
|
||||
|
||||
CLIENT_LABELS[pid] = []
|
||||
# Optionally also remove their timestamp entry if you don't
|
||||
# want them checked again until next registration/update:
|
||||
@@ -94,6 +95,7 @@ async def broadcast_labels_periodically():
|
||||
ws.send(payload) for ws in CLIENTS.values()
|
||||
), return_exceptions=True)
|
||||
logging.debug("Broadcasted labels to %d clients", len(CLIENTS))
|
||||
logging.info("Broadcasted labels to %d clients", len(CLIENTS))
|
||||
|
||||
await asyncio.sleep(1)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user