Extract config into yaml

This commit is contained in:
Ian Renton
2025-09-27 14:54:14 +01:00
parent 6d735cfc67
commit 00c56a7c10
9 changed files with 48 additions and 14 deletions

View File

@@ -5,7 +5,7 @@ import sys
from time import sleep
from core.cleanup import CleanupTimer
from core.constants import MAX_SPOT_AGE_SEC, WEB_SERVER_PORT
from core.config import config
from providers.dxcluster import DXCluster
from providers.gma import GMA
from providers.hema import HEMA
@@ -63,11 +63,11 @@ if __name__ == '__main__':
for p in providers: p.start()
# Set up timer to clear spot list of old data
cleanup_timer = CleanupTimer(spot_list=spot_list, cleanup_interval=60, max_spot_age=MAX_SPOT_AGE_SEC)
cleanup_timer = CleanupTimer(spot_list=spot_list, cleanup_interval=60, max_spot_age=config["max-spot-age-sec"])
cleanup_timer.start()
# Set up web server
web_server = WebServer(spot_list=spot_list, port=WEB_SERVER_PORT)
web_server = WebServer(spot_list=spot_list, port=config["web-server-port"])
web_server.start()
logging.info("Startup complete.")