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
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: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
39161cc993
commit
9eaa32f26f
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()).
|
# Event lat/lon mirrored from Geo.centroid into event.data (see poll()).
|
||||||
enrichment_locations = [("latitude", "longitude")]
|
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__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
|
|
||||||
|
|
@ -36,14 +36,15 @@ BATCH_SIZE = 100
|
||||||
FETCH_TIMEOUT = 5.0
|
FETCH_TIMEOUT = 5.0
|
||||||
ACK_WAIT = 30
|
ACK_WAIT = 30
|
||||||
|
|
||||||
# v0.14.2: adapters whose events are global-by-design (satellite telemetry) and
|
# v0.14.2: adapters whose events are global-by-design (satellite telemetry,
|
||||||
# must bypass the geographic monitoring-area bbox filter. The archive consumer
|
# global disaster feeds) and must bypass the geographic monitoring-area bbox
|
||||||
# only has the adapter NAME at runtime (it reads off the wire, not the adapter
|
# filter. The archive consumer only has the adapter NAME at runtime (it reads
|
||||||
# class), so it can't reach SourceAdapter.bypass_bbox_filter directly -- this
|
# off the wire, not the adapter class), so it can't reach
|
||||||
# static set is the consumer-side mirror. It MUST stay in sync with the adapter
|
# SourceAdapter.bypass_bbox_filter directly -- this static set is the
|
||||||
# classes that set bypass_bbox_filter = True; tests/test_bypass_bbox_consistency.py
|
# consumer-side mirror. It MUST stay in sync with the adapter classes that set
|
||||||
# fails CI if the two drift.
|
# bypass_bbox_filter = True; tests/test_bypass_bbox_consistency.py fails CI if
|
||||||
_BYPASS_BBOX_ADAPTERS = {"sat_positions", "sat_orbits"}
|
# the two drift.
|
||||||
|
_BYPASS_BBOX_ADAPTERS = {"sat_positions", "sat_orbits", "eonet"}
|
||||||
|
|
||||||
|
|
||||||
def consumer_name_for(stream: str) -> str:
|
def consumer_name_for(stream: str) -> str:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue