feat: add rule-based weather alert engine for short-horizon trading signals, including momentum, forecast breakthrough, Ankara DEB, and advection alerts.

This commit is contained in:
2569718930@qq.com
2026-03-06 12:36:13 +08:00
parent 43b7c1b480
commit 4d6a915690
2 changed files with 17 additions and 1 deletions
+1 -1
View File
@@ -192,7 +192,7 @@ def _maybe_send_alert(
last_city_ts = int(last_city.get("ts") or 0)
last_sig_ts = int((state.get("by_signature") or {}).get(signature) or 0)
if last_city_sig == signature and now_ts - last_city_ts < cooldown_sec:
if last_city_ts and now_ts - last_city_ts < cooldown_sec:
return False
if last_sig_ts and now_ts - last_sig_ts < cooldown_sec:
return False