From cbf6a12f79735b2ecbca10f44d1f94feac79e716 Mon Sep 17 00:00:00 2001 From: "2569718930@qq.com" <2569718930@qq.com> Date: Fri, 15 May 2026 17:43:41 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B7=91=E9=81=93=E8=A7=82=E6=B5=8B=E6=8E=A8?= =?UTF-8?q?=E9=80=81=E5=A2=9E=E5=8A=A0=E5=B8=82=E5=9C=BA=E6=9C=80=E9=AB=98?= =?UTF-8?q?=E9=80=89=E9=A1=B9=E5=AF=B9=E6=AF=94=EF=BC=8C=E8=B6=85=E8=BF=87?= =?UTF-8?q?=E5=B8=82=E5=9C=BA=E8=A6=86=E7=9B=96=E8=8C=83=E5=9B=B4=E5=88=99?= =?UTF-8?q?=E8=B7=B3=E8=BF=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/telegram_push.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/utils/telegram_push.py b/src/utils/telegram_push.py index 5ef0be7f..6f7fad51 100644 --- a/src/utils/telegram_push.py +++ b/src/utils/telegram_push.py @@ -878,12 +878,25 @@ def _run_high_freq_airport_cycle( city_weather: Dict[str, Any] = {} deb_pred: Optional[float] = None + market_high: Optional[float] = None try: from web.app import _analyze + from web.services.city_payloads import build_city_market_scan_payload city_weather = _analyze(city) deb_raw = (city_weather.get("deb") or {}).get("prediction") if deb_raw is not None: deb_pred = float(deb_raw) + # 取市场最高温度选项 + scan = build_city_market_scan_payload(city_weather) + ms = (scan.get("market_scan") or {}) if isinstance(scan, dict) else {} + if ms.get("available"): + related = ms.get("related_buckets") or [] + for b in related: + t = b.get("temp") if isinstance(b, dict) else None + if t is not None: + t = float(t) + if market_high is None or t > market_high: + market_high = t except Exception: pass @@ -969,6 +982,11 @@ def _run_high_freq_airport_cycle( break if not any_in_window: continue + # 如果跑道最高温已超过市场最高选项,行情已定,跳过 + if market_high is not None: + rwy_max = max((t for (t, _d) in runway_temps if t is not None), default=None) + if rwy_max is not None and rwy_max > market_high: + continue # 用观测数据时间而非当前本地时间 airport_cur = city_weather.get("airport_current") or {}