Bring back cleanup thread

This commit is contained in:
Ian Renton
2026-08-13 07:07:15 +01:00
parent 6a4b0bed95
commit bab14bd7ac
13 changed files with 113 additions and 16 deletions
+4
View File
@@ -5,6 +5,7 @@ from threading import Thread, Event
import psutil
import pytz
from core.cleanup import CLEANUP_TIMER
from core.config import SERVER_OWNER_CALLSIGN
from core.constants import SOFTWARE_VERSION
from core.data_providers import DATA_PROVIDERS
@@ -88,6 +89,9 @@ class StatusReporter:
tzinfo=pytz.UTC).timestamp() if p.last_update_time.year > 2000 else 0,
"lookup_count": p.lookup_count},
DATA_PROVIDERS.callsign_data_providers))
DATA_STORE.status_data["cleanup"] = {"status": CLEANUP_TIMER.status,
"last_ran": CLEANUP_TIMER.last_cleanup_time.replace(
tzinfo=pytz.UTC).timestamp() if CLEANUP_TIMER.last_cleanup_time else 0}
DATA_STORE.status_data["webserver"] = {"status": WEB_SERVER.web_server_metrics["status"],
"last_api_access": WEB_SERVER.web_server_metrics[
"last_api_access_time"].replace(