mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-06-24 05:35:10 +00:00
Merge branch 'main' into 95-send-spots-to-xota
# Conflicts: # README.md # server/handlers/api/addspot.py # server/handlers/api/options.py # spotproviders/tiles.py # templates/about.html # templates/add_spot.html # templates/alerts.html # templates/api_only_home.html # templates/bands.html # templates/base.html # templates/conditions.html # templates/map.html # templates/spots.html # templates/status.html # webassets/css/style.css # webassets/js/add-spot.js # webassets/js/geo.js # webassets/js/ui-ham.js # webassets/js/utils.js
This commit is contained in:
13
spothole.py
13
spothole.py
@@ -8,11 +8,11 @@ import sys
|
||||
from diskcache import Cache
|
||||
|
||||
from core.cleanup import CleanupTimer
|
||||
from data.solar_conditions import SolarConditions
|
||||
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 data.solar_conditions import SolarConditions
|
||||
from server.webserver import WebServer
|
||||
|
||||
# Globals
|
||||
@@ -29,13 +29,14 @@ cleanup_timer = None
|
||||
run = True
|
||||
|
||||
|
||||
def shutdown(sig, frame):
|
||||
def shutdown(_signum=None, _frame=None):
|
||||
"""Shutdown function"""
|
||||
|
||||
global run
|
||||
|
||||
logging.info("Stopping program...")
|
||||
web_server.stop()
|
||||
if web_server:
|
||||
web_server.stop()
|
||||
for sp in spot_providers:
|
||||
if sp.enabled:
|
||||
sp.stop()
|
||||
@@ -45,8 +46,10 @@ def shutdown(sig, frame):
|
||||
for scp in solar_condition_providers:
|
||||
if scp.enabled:
|
||||
scp.stop()
|
||||
cleanup_timer.stop()
|
||||
lookup_helper.stop()
|
||||
if cleanup_timer:
|
||||
cleanup_timer.stop()
|
||||
if lookup_helper:
|
||||
lookup_helper.stop()
|
||||
spots.close()
|
||||
alerts.close()
|
||||
solar_conditions_cache.close()
|
||||
|
||||
Reference in New Issue
Block a user