fix: pipeline reliability — WS, summarizer, ingest, health
Stop the live HUD reconnect storm (nginx WS snippet + backoff), copy intel/nous_client into the summarizer image, and make event ingest idempotent on URL. GDELT uses the DOC API; NWS no longer sends bbox; FIRMS is one ON CONFLICT batch; GET /api/aircraft serves last-known. Health reports freshness without 503ing docker. EONET + CISA KEV added.
This commit is contained in:
parent
c6bfc50705
commit
d81ea68dec
26 changed files with 1164 additions and 110 deletions
21
tests/test_cache_and_timeline.py
Normal file
21
tests/test_cache_and_timeline.py
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
"""Timeline bucket_hours + static Cache-Control."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
ROOT = Path(__file__).resolve().parent.parent
|
||||
|
||||
|
||||
def test_timeline_uses_bucket_hours():
|
||||
src = (ROOT / "app/main.py").read_text()
|
||||
fn = src.split("async def get_timeline")[1].split("async def sentiment_by_source")[0]
|
||||
assert "bucket_hours" in fn
|
||||
assert "date_trunc('hour'" not in fn or "bucket" in fn.lower()
|
||||
# Must not ignore the query param.
|
||||
assert ":bucket" in fn or "bucket_hours" in fn.split("text(")[1][:800]
|
||||
|
||||
|
||||
def test_static_vendor_cache_control():
|
||||
src = (ROOT / "app/main.py").read_text()
|
||||
assert "max-age=31536000" in src or "immutable" in src.lower()
|
||||
Loading…
Reference in a new issue