From 88b83660679803bed434b1399731b62445962c04 Mon Sep 17 00:00:00 2001 From: "2569718930@qq.com" <2569718930@qq.com> Date: Tue, 12 May 2026 17:55:20 +0800 Subject: [PATCH] =?UTF-8?q?@=20=E9=A6=96=E5=B0=94/=E9=87=9C=E5=B1=B1?= =?UTF-8?q?=E6=B8=A9=E5=BA=A6=E6=80=A5=E5=8F=98=E6=B6=88=E6=81=AF=E5=B1=95?= =?UTF-8?q?=E7=A4=BA=E5=90=84=E8=B7=91=E9=81=93=E5=AF=B9=E6=B8=A9=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AMOS 两个跑道对独立展示(如 15L/33R 14.6°C / 15R/33L 15.2°C), 东京和安卡拉仍显示单站温度。 Constraint: 跑道对信息从 city_weather.amos.runway_obs 提取,仅首尔/釜山有效 Scope-risk: 低,仅改消息格式 Tested: ruff check 通过 @ --- src/utils/telegram_push.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/utils/telegram_push.py b/src/utils/telegram_push.py index ace29ffc..15583126 100644 --- a/src/utils/telegram_push.py +++ b/src/utils/telegram_push.py @@ -757,13 +757,16 @@ def _build_airport_rapid_change_message( deb_pred: Optional[float], ) -> str: airport_label = {"seoul": "首尔/仁川", "busan": "釜山/金海", "tokyo": "东京/羽田", "ankara": "安卡拉/Esenboğa"}.get(city, city.title()) + runway_pairs = rule.get("runway_pairs") or [] + runway_temps = rule.get("runway_temps") or [] last = rule.get("last_temp", 0) - lines = [ - f"🚨 {airport_label} 温度急变", - "", - f"当前 {last:.1f}°C", - ] + lines = [f"🚨 {airport_label} 温度急变", ""] + if runway_pairs and runway_temps and len(runway_pairs) == len(runway_temps): + for (r1, r2), (t, _d) in zip(runway_pairs, runway_temps): + lines.append(f"{r1}/{r2} {t:.1f}°C") + else: + lines.append(f"当前 {last:.1f}°C") if deb_pred is not None: lines.append(f"DEB 预测最高 {deb_pred:.1f}°C") return "\n".join(lines) @@ -817,6 +820,11 @@ def _run_high_freq_airport_cycle( if last_city_ts and now_ts - last_city_ts < HIGH_FREQ_COOLDOWN_SEC: continue + # Extract runway temps for AMOS cities + amos = city_weather.get("amos") or {} + runway_data = (amos.get("runway_obs") or {}) if amos else {} + rule["runway_pairs"] = runway_data.get("runway_pairs") or [] + rule["runway_temps"] = runway_data.get("temperatures") or [] rule["wind_kt"] = latest_obs.get("wind_kt") message = _build_airport_rapid_change_message(city, rule, deb_pred)