mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-06-24 05:35:10 +00:00
General refactor to remove stuff being passed around the Tornado handlers when it doesn't need to be. Conditions provider presence is how handled on the JS side without needing special booleans sent to every page handler.
This commit is contained in:
10
spothole.py
10
spothole.py
@@ -9,8 +9,8 @@ from diskcache import Cache
|
||||
|
||||
from core.cleanup import CleanupTimer
|
||||
from data.solar_conditions import SolarConditions
|
||||
from core.config import config, WEB_SERVER_PORT, SERVER_OWNER_CALLSIGN, API_ONLY_MODE
|
||||
from core.constants import SOFTWARE_NAME, SOFTWARE_VERSION
|
||||
from core.config import config, SERVER_OWNER_CALLSIGN
|
||||
from core.constants import SOFTWARE_VERSION
|
||||
from core.lookup_helper import lookup_helper
|
||||
from core.status_reporter import StatusReporter
|
||||
from server.webserver import WebServer
|
||||
@@ -90,7 +90,7 @@ if __name__ == '__main__':
|
||||
|
||||
logging.info("Starting...")
|
||||
logging.info(
|
||||
"This is " + SOFTWARE_NAME + " version " + SOFTWARE_VERSION + ". This instance is run by " + SERVER_OWNER_CALLSIGN + ".")
|
||||
"This is Spothole version " + SOFTWARE_VERSION + ". This instance is run by " + SERVER_OWNER_CALLSIGN + ".")
|
||||
|
||||
# Shut down gracefully on SIGINT
|
||||
signal.signal(signal.SIGINT, shutdown)
|
||||
@@ -99,9 +99,7 @@ if __name__ == '__main__':
|
||||
lookup_helper.start()
|
||||
|
||||
# Set up web server
|
||||
web_server = WebServer(spots=spots, alerts=alerts, solar_conditions=solar_conditions, status_data=status_data,
|
||||
solar_condition_providers=solar_condition_providers, port=WEB_SERVER_PORT,
|
||||
api_only_mode=API_ONLY_MODE)
|
||||
web_server = WebServer(spots=spots, alerts=alerts, solar_conditions=solar_conditions, status_data=status_data)
|
||||
|
||||
# Fetch, set up and start spot providers
|
||||
for entry in config["spot-providers"]:
|
||||
|
||||
Reference in New Issue
Block a user