mirror of
https://github.com/zvx-echo6/meshai.git
synced 2026-06-11 01:14:45 +02:00
fix(central): use LAST_PER_SUBJECT and filter non-WF incidents
- consumer.py: change DeliverPolicy from NEW to LAST_PER_SUBJECT to get latest state per subject on reconnect instead of replaying backlog - central_normalizer.py: drop RX and non-wildfire (non-WF) incident types early in _parse_wfigs_incidents before they reach the handler Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
798712d20c
commit
bd4b264672
2 changed files with 3 additions and 1 deletions
|
|
@ -33,7 +33,7 @@ def consumer_config():
|
|||
msgs for high-volume streams like traffic_flow).
|
||||
"""
|
||||
from nats.js.api import ConsumerConfig, DeliverPolicy
|
||||
return ConsumerConfig(deliver_policy=DeliverPolicy.NEW)
|
||||
return ConsumerConfig(deliver_policy=DeliverPolicy.LAST_PER_SUBJECT)
|
||||
|
||||
|
||||
# Bare-wildcard subjects, pre-v0.9.20. Still used when `central.region` is
|
||||
|
|
|
|||
|
|
@ -676,6 +676,8 @@ def _parse_wfigs_incidents(inner_data: dict, geo: dict) -> dict:
|
|||
irwin_id = inner_data.get("IrwinID") or inner_data.get("irwin_id")
|
||||
name = inner_data.get("IncidentName")
|
||||
itype = inner_data.get("IncidentTypeCategory")
|
||||
if itype is not None and itype != "WF":
|
||||
return None
|
||||
lat = inner_data.get("latitude")
|
||||
lon = inner_data.get("longitude")
|
||||
county = inner_data.get("POOCounty")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue