Wire ingestion: long-running ingester (sources->NATS->Postgres), fix nats-py API (durable=/LIMITS), drop UUID source_id on RSS
All checks were successful
build-and-deploy / build (push) Successful in 4m18s

This commit is contained in:
sirius0xdev 2026-07-07 19:35:28 -04:00
commit 67fee36c7c
No known key found for this signature in database
4 changed files with 6 additions and 5 deletions

View file

@ -40,7 +40,7 @@ async def publish_event(subject: str, event: dict):
# ─── RSS Feed Ingestor ──────────────────────────────────────────────────
async def ingest_rss_feed(feed_url: str, source_id: str = None):
async def ingest_rss_feed(feed_url: str):
"""Fetch and parse an RSS feed, publish items to NATS."""
async with httpx.AsyncClient(timeout=30) as client:
resp = await client.get(feed_url)
@ -51,7 +51,6 @@ async def ingest_rss_feed(feed_url: str, source_id: str = None):
for entry in feed.entries[:100]: # max 100 per run
event = {
"source_type": "rss",
"source_id": source_id,
"title": entry.get("title"),
"body": entry.get("summary") or entry.get("description"),
"url": entry.get("link"),
@ -59,6 +58,7 @@ async def ingest_rss_feed(feed_url: str, source_id: str = None):
or datetime.now(timezone.utc).isoformat(),
"tags": [t.get("term") for t in entry.get("tags", []) if t.get("term")],
"raw": {
"feed_url": feed_url,
"feed_title": feed.feed.get("title"),
"author": entry.get("author"),
"categories": [c.get("term") for c in entry.get("categories", [])],