perf: UX-safe fetch trimming and instant layer-enable refresh.

Drop duplicate slow-tier weather/ukraine jobs, gate correlations when off, slim health probes, keyed layer-panel subscriptions, align backend layer defaults with the dashboard, and fetch CCTV/FIRMS/PSK/etc. synchronously on enable so toggles stay responsive without background prefetch waste.
This commit is contained in:
BigBodyCobain
2026-06-23 00:16:38 -06:00
parent 4968f706bb
commit 53ed63ffcf
12 changed files with 532 additions and 59 deletions
@@ -0,0 +1,18 @@
"""Integration: layer enable triggers immediate data availability."""
from __future__ import annotations
from services.fetchers._store import active_layers, latest_data, _data_lock
def test_firms_enable_populates_slow_payload(client):
with _data_lock:
active_layers["firms"] = False
latest_data["firms_fires"] = []
r = client.post("/api/layers", json={"layers": {"firms": True}})
assert r.status_code == 200
slow = client.get("/api/live-data/slow")
assert slow.status_code == 200
fires = slow.json().get("firms_fires") or []
assert len(fires) > 0, "firms layer should populate on enable without waiting for scheduler"