mirror of
https://github.com/BigBodyCobain/Shadowbroker.git
synced 2026-08-11 05:00:30 +02:00
fix(ui): SAR credential setup in Settings and async layer toggles.
Add Earthdata token entry on the SAR tab with accurate Mode B status, expose optional FIRMS_MAP_KEY in API settings, and remove the frontend operator-unlock gate that blocked localhost saves. Run network-heavy layer-enable fetches on a background executor with frontend retry polling so FIRMS toggles no longer freeze the single API worker.
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
"""Integration: layer enable triggers immediate data availability."""
|
||||
from __future__ import annotations
|
||||
|
||||
import time
|
||||
|
||||
from services.fetchers._store import active_layers, latest_data, _data_lock
|
||||
|
||||
|
||||
@@ -12,7 +14,13 @@ def test_firms_enable_populates_slow_payload(client):
|
||||
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"
|
||||
fires: list = []
|
||||
for _ in range(45):
|
||||
slow = client.get("/api/live-data/slow")
|
||||
assert slow.status_code == 200
|
||||
fires = slow.json().get("firms_fires") or []
|
||||
if fires:
|
||||
break
|
||||
time.sleep(2)
|
||||
|
||||
assert len(fires) > 0, "firms layer should populate after async on-enable fetch"
|
||||
|
||||
Reference in New Issue
Block a user