mirror of
https://github.com/zvx-echo6/central.git
synced 2026-08-26 17:31:39 +00:00
eonet: bypass bbox filter for global disaster feed (#113)
EONET events are global-by-design and were being dropped 100% by the supervisor's monitoring_areas bbox filter. Set bypass_bbox_filter = True on EONETAdapter (mirrors the v0.14.2/#108 satellite-telemetry exemption). Also adds "eonet" to archive._BYPASS_BBOX_ADAPTERS to satisfy the consumer-side mirror enforced by tests/test_bypass_bbox_consistency.py. Co-authored-by: Ubuntu <zvx@cortex.echo6.co> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
d3a1be82fe
commit
2d4bf022db
2 changed files with 15 additions and 8 deletions
|
|
@ -152,6 +152,12 @@ class EONETAdapter(SourceAdapter):
|
|||
|
||||
# Event lat/lon mirrored from Geo.centroid into event.data (see poll()).
|
||||
enrichment_locations = [("latitude", "longitude")]
|
||||
# Global-by-design: EONET disaster events (earthquakes, floods, wildfires,
|
||||
# etc.) span the entire globe. A geographic monitoring area (e.g. Idaho)
|
||||
# drops everything outside the bbox, yielding zero events. Skip the
|
||||
# publish-time/archive bbox filter (mirrors v0.14.2/#108 satellite exemption).
|
||||
# Keep in sync with archive._BYPASS_BBOX_ADAPTERS.
|
||||
bypass_bbox_filter = True
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
|
|
|
|||
|
|
@ -36,14 +36,15 @@ BATCH_SIZE = 100
|
|||
FETCH_TIMEOUT = 5.0
|
||||
ACK_WAIT = 30
|
||||
|
||||
# v0.14.2: adapters whose events are global-by-design (satellite telemetry) and
|
||||
# must bypass the geographic monitoring-area bbox filter. The archive consumer
|
||||
# only has the adapter NAME at runtime (it reads off the wire, not the adapter
|
||||
# class), so it can't reach SourceAdapter.bypass_bbox_filter directly -- this
|
||||
# static set is the consumer-side mirror. It MUST stay in sync with the adapter
|
||||
# classes that set bypass_bbox_filter = True; tests/test_bypass_bbox_consistency.py
|
||||
# fails CI if the two drift.
|
||||
_BYPASS_BBOX_ADAPTERS = {"sat_positions", "sat_orbits"}
|
||||
# v0.14.2: adapters whose events are global-by-design (satellite telemetry,
|
||||
# global disaster feeds) and must bypass the geographic monitoring-area bbox
|
||||
# filter. The archive consumer only has the adapter NAME at runtime (it reads
|
||||
# off the wire, not the adapter class), so it can't reach
|
||||
# SourceAdapter.bypass_bbox_filter directly -- this static set is the
|
||||
# consumer-side mirror. It MUST stay in sync with the adapter classes that set
|
||||
# bypass_bbox_filter = True; tests/test_bypass_bbox_consistency.py fails CI if
|
||||
# the two drift.
|
||||
_BYPASS_BBOX_ADAPTERS = {"sat_positions", "sat_orbits", "eonet"}
|
||||
|
||||
|
||||
def consumer_name_for(stream: str) -> str:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue