mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-08-06 02:21:42 +00:00
Refactor of caching & data storage part 17 #118
This commit is contained in:
@@ -30,6 +30,8 @@ LOG_WEB_REQUESTS = config.get("log-web-requests", False)
|
||||
# but for consistency we provide this to the front-end in web-ui-options because it has no impact outside of the web UI.
|
||||
WEB_UI_OPTIONS["spot-providers-enabled-by-default"] = [p["name"] for p in config["spot-providers"] if p["enabled"] and (
|
||||
"enabled-by-default-in-web-ui" not in p or p["enabled-by-default-in-web-ui"])]
|
||||
WEB_UI_OPTIONS["qrz-enabled"] = any(p["class"] == "QRZ" and p["enabled"] for p in config["callsign-data-providers"])
|
||||
WEB_UI_OPTIONS["hamqth-enabled"] = any(p["class"] == "HamQTH" and p["enabled"] for p in config["callsign-data-providers"])
|
||||
# If spotting to this server is enabled, "API" is another valid spot source even though it does not come from
|
||||
# one of our proviers. We set that to also be enabled by default.
|
||||
if ALLOW_SPOTTING:
|
||||
|
||||
@@ -92,7 +92,7 @@ class LiveDataCache:
|
||||
time.sleep(interval)
|
||||
self.save_snapshot()
|
||||
|
||||
t = threading.Thread(target=loop, daemon=True, name=f"snapshot-{self._snapshot_dir}")
|
||||
t = threading.Thread(target=loop, name=f"LiveDataCache-Snapshot-{self._snapshot_dir}")
|
||||
t.start()
|
||||
|
||||
def close(self):
|
||||
|
||||
@@ -30,7 +30,7 @@ class StatusReporter:
|
||||
def start(self):
|
||||
"""Start the reporter thread"""
|
||||
|
||||
self._thread = Thread(target=self._run, daemon=True)
|
||||
self._thread = Thread(target=self._run, name="StatusReporter")
|
||||
self._thread.start()
|
||||
|
||||
def stop(self):
|
||||
|
||||
Reference in New Issue
Block a user