mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2025-10-27 16:59:25 +00:00
Extract config into yaml
This commit is contained in:
6
main.py
6
main.py
@@ -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.")
|
||||
|
||||
Reference in New Issue
Block a user