mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-02-04 01:04:33 +00:00
Split up some code for sanity #3
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
# Main script
|
||||
import importlib
|
||||
import logging
|
||||
import os
|
||||
import signal
|
||||
import sys
|
||||
|
||||
@@ -28,7 +29,7 @@ run = True
|
||||
def shutdown(sig, frame):
|
||||
global run
|
||||
|
||||
logging.info("Stopping program, this may take up to 60 seconds...")
|
||||
logging.info("Stopping program...")
|
||||
web_server.stop()
|
||||
for p in spot_providers:
|
||||
if p.enabled:
|
||||
@@ -40,6 +41,7 @@ def shutdown(sig, frame):
|
||||
lookup_helper.stop()
|
||||
spots.close()
|
||||
alerts.close()
|
||||
os._exit(0)
|
||||
|
||||
|
||||
# Utility method to get a spot provider based on the class specified in its config entry.
|
||||
|
||||
Reference in New Issue
Block a user