From befaceb2f5dce4c8675a7929d9a1dcdbc0fced6f Mon Sep 17 00:00:00 2001 From: Ian Renton Date: Mon, 22 Dec 2025 12:20:32 +0000 Subject: [PATCH] First attempt at SSE backend #3 --- spothole.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/spothole.py b/spothole.py index 0e11d13..ba6b587 100644 --- a/spothole.py +++ b/spothole.py @@ -26,7 +26,6 @@ cleanup_timer = None # Shutdown function def shutdown(sig, frame): - global spot_providers, alert_providers, cleanup_timer, spots, alerts logging.info("Stopping program, this may take a few seconds...") for p in spot_providers: if p.enabled: @@ -56,7 +55,6 @@ def get_alert_provider_from_config(config_providers_entry): # Utility method to add a spot, notifying the web server in case any Server-Sent Event connections need to have data # sent immediately. If the spot has already expired due to loading old data, it will be ignored. def add_spot(spot): - global web_server if not spot.expired(): spots.add(spot.id, spot, expire=MAX_SPOT_AGE) if web_server: @@ -65,7 +63,6 @@ def add_spot(spot): # Utility method to add an alert, notifying the web server in case any Server-Sent Event connections need to have data # sent immediately. If the alert has already expired due to loading old data, it will be ignored. def add_alert(alert): - global web_server if not alert.expired(): alerts.add(alert.id, alert, expire=MAX_SPOT_AGE) if web_server: