CoWIN 6087 历史持久化 + 跑道曲线聚合 + 模型区间修复 + HKO 曲线对调 + 毛玻璃加载层
- weather_sources: CoWIN 1min 观测写入 official_intraday_observations_store - country_networks: cowin_obs 源从 DB 回读 1min 历史,不复用 VHHH METAR - analysis_service: 跑道实测 36h 历史按跑道分组,透传至前端 - scan_terminal_city_row: model_cluster_sources fallback 修复 + runway_plate_history - 前端: CoWIN 6087 升级为主轴实线,HKO 退为虚线,VHHH METAR 轻虚线 - 前端: Loading 升级为毛玻璃全卡蒙层
This commit is contained in:
@@ -1141,14 +1141,26 @@ class WeatherDataCollector(OpenMeteoCacheMixin, SettlementSourceMixin, MetarSour
|
||||
results["nearby_source"] = "cowin_obs"
|
||||
try:
|
||||
row = rows[0] if rows else {}
|
||||
temp_c = row.get("temp")
|
||||
if use_fahrenheit and temp_c is not None:
|
||||
temp_c = round((temp_c - 32.0) * 5.0 / 9.0, 1)
|
||||
|
||||
DBManager().append_airport_obs(
|
||||
icao=str(row.get("icao") or "COWIN6087"),
|
||||
city=city_lower,
|
||||
temp_c=row.get("temp"),
|
||||
temp_c=temp_c,
|
||||
obs_time=str(row.get("obs_time") or datetime.now().isoformat()),
|
||||
)
|
||||
|
||||
self._update_official_today_obs(
|
||||
source_code="cowin_obs",
|
||||
station_code=str(row.get("istNo") or "6087"),
|
||||
obs_iso=str(row.get("obs_time") or datetime.now(timezone.utc).isoformat()),
|
||||
current_temp=temp_c,
|
||||
utc_offset_seconds=28800,
|
||||
)
|
||||
except Exception:
|
||||
logger.exception("airport_obs_log append failed for cowin_obs city={}", city_lower)
|
||||
logger.exception("airport_obs_log append/update failed for cowin_obs city={}", city_lower)
|
||||
|
||||
def _attach_cwa_settlement_nearby(
|
||||
self, results: Dict, city_lower: str, use_fahrenheit: bool
|
||||
|
||||
Reference in New Issue
Block a user