AMOS 增加 info 级别日志追踪数据流

- weather_sources.py: _attach_korean_amos_data 记录 fetch 开始、成功/失败、温度/跑道数据
- amos_station_sources.py: _amos_get_page 记录页面匹配/不匹配
- amos_station_sources.py: fetch_amos_official_current 记录 HTML 获取和解析
- analysis_service.py: _analyze 记录 AMOS 数据是否到达分析层

重启后端后在日志中搜索 "AMOS" 可追踪完整数据流:
  AMOS: fetching for city=seoul
  AMOS page matched icao=RKSI length=...
  AMOS fetch_amos_official_current: got HTML for RKSI...
  AMOS: got data for city=seoul temp_c=... source=...
  AMOS _analyze: found amos data for city=seoul temp_c=...
This commit is contained in:
2569718930@qq.com
2026-05-10 19:46:26 +08:00
parent 23e5d10f65
commit 8075fb66b7
3 changed files with 16 additions and 3 deletions
+3
View File
@@ -1733,6 +1733,9 @@ def _analyze(
mg_cur = mgm.get("current", {}) if mgm else {}
sc_cur = settlement_current.get("current", {}) if settlement_current else {}
amos_data = raw.get("amos") or {}
if amos_data:
logger.info("AMOS _analyze: found amos data for city={} temp_c={} source={}",
city, amos_data.get("temp_c"), amos_data.get("source"))
use_settlement_current = settlement_source in {"hko", "cwa", "noaa", "wunderground"} and bool(sc_cur)
live_mc = mc if metar_current_is_today else {}
primary_current = sc_cur if use_settlement_current else live_mc