feat: lean-Pi WS fan-out, geofences, DVR playback, fire/aircraft correlation

Phase 1: in-memory ConnectionManager viewport fan-out, 500ms map debounce,
cachetools TTLCache, background masscan/ffmpeg, compose memory caps.

Phase 2: PostGIS geofences + ST_Intersects alerts, Timescale 1-min CAGGs
and timestamp playback, FIRMS/WFIGS x firefighting ADS-B within 20 miles.

No Redis/Kafka/Celery.
This commit is contained in:
Sirius DevOps 2026-08-28 09:33:19 -04:00
commit 5ea9a4e879
28 changed files with 2318 additions and 50 deletions

View file

@ -95,6 +95,23 @@ async def ingest_fire_row(msg: dict) -> bool:
"ingested fire %.5f,%.5f %s satellite=%s",
row["latitude"], row["longitude"], row["acq_time"], row["satellite"],
)
lat, lon = row["latitude"], row["longitude"]
from geofence import record_and_notify
await record_and_notify(
source_kind="firms",
entity_id=f"{lat},{lon},{row['satellite']}",
lat=lat, lon=lon, payload={"satellite": row["satellite"]},
)
from live_layers import aircraft_last_known
from fire_aircraft import correlate_and_notify
from tracks import recent_markers
acs = list(aircraft_last_known.values()) or await recent_markers("aircraft")
if acs:
fire = {
"id": f"firms:{lat:.4f},{lon:.4f}",
"lat": lat, "lon": lon, "label": "FIRMS",
}
await correlate_and_notify([fire], acs)
return inserted