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

@ -12,6 +12,7 @@ import feedparser
import nats
from config import NATS_URL
from upstream_cache import rss_cache
logger = logging.getLogger("osint.sources")
@ -40,12 +41,16 @@ async def publish_event(subject: str, event: dict):
# ─── RSS Feed Ingestor ──────────────────────────────────────────────────
async def ingest_rss_feed(feed_url: str):
async def ingest_rss_feed(feed_url: str, source_id: str | None = None):
"""Fetch and parse an RSS feed, publish items to NATS."""
async with httpx.AsyncClient(timeout=30) as client:
resp = await client.get(feed_url)
resp.raise_for_status()
feed = feedparser.parse(resp.text)
text = rss_cache.get(feed_url)
if text is None:
async with httpx.AsyncClient(timeout=30) as client:
resp = await client.get(feed_url)
resp.raise_for_status()
text = resp.text
rss_cache[feed_url] = text
feed = feedparser.parse(text)
count = 0
for entry in feed.entries[:100]: # max 100 per run