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
@@ -4,6 +4,7 @@ import os
import signal
import sys
from core.cleanup import CLEANUP_TIMER
from core.config import SERVER_OWNER_CALLSIGN, LOG_LEVEL
from core.constants import SOFTWARE_VERSION
from core.data_providers import DATA_PROVIDERS
@@ -22,6 +23,7 @@ def shutdown(_signum=None, _frame=None):
logging.info("Stopping program...")
WEB_SERVER.stop()
DATA_PROVIDERS.stop()
CLEANUP_TIMER.stop()
DATA_STORE.close()
os._exit(0)
@@ -47,6 +49,8 @@ if __name__ == '__main__':
# Set up data store
DATA_STORE.setup()
CLEANUP_TIMER.setup(cleanup_interval=60)
CLEANUP_TIMER.start()
# Set up and start data providers
DATA_PROVIDERS.setup()