Update landing and weather observation policies
This commit is contained in:
@@ -1212,7 +1212,10 @@ def build_country_network_snapshot(city: str, raw: Dict[str, Any]) -> Dict[str,
|
||||
"stale_row_count": stale_count,
|
||||
"unknown_timing_count": unknown_count,
|
||||
}
|
||||
airport_primary_today_obs = ((raw.get("metar") or {}).get("today_obs") or [])
|
||||
if provider.provider_code == "turkey_mgm":
|
||||
airport_primary_today_obs = raw.get("mgm_today_obs") or []
|
||||
else:
|
||||
airport_primary_today_obs = ((raw.get("metar") or {}).get("today_obs") or [])
|
||||
if airport_primary.get("source_code") == "cowin_obs":
|
||||
live_points = raw.get("cowin_today_obs") or []
|
||||
if live_points:
|
||||
|
||||
@@ -1042,6 +1042,18 @@ class WeatherDataCollector(OpenMeteoCacheMixin, SettlementSourceMixin, MetarSour
|
||||
mgm_data.get("obs_time"),
|
||||
source="mgm",
|
||||
)
|
||||
try:
|
||||
today_obs = self._update_official_today_obs(
|
||||
source_code="mgm",
|
||||
station_code=str(istno),
|
||||
obs_iso=mgm_data.get("obs_time"),
|
||||
current_temp=mgm_current.get("temp"),
|
||||
utc_offset_seconds=get_city_utc_offset_seconds(city_lower),
|
||||
)
|
||||
if today_obs:
|
||||
results["mgm_today_obs"] = today_obs
|
||||
except Exception:
|
||||
logger.exception("mgm today observation update failed for city={}", city_lower)
|
||||
# Log airport obs for high-freq monitoring (Ankara 17128)
|
||||
try:
|
||||
DBManager().append_airport_obs(
|
||||
|
||||
Reference in New Issue
Block a user