多模型逐时数据兜底:analysis 缓存无 hourly 时直接调 fetch_multi_model

This commit is contained in:
2569718930@qq.com
2026-05-25 18:39:54 +08:00
parent 887148a85e
commit acf3e10ea2
+4
View File
@@ -751,6 +751,10 @@ def _analyze(
ens_raw = {}
if not isinstance(mm, dict):
mm = {}
if not mm.get("hourly_times"):
mm_hourly = _weather.fetch_multi_model(lat, lon, city=city, use_fahrenheit=is_f)
if mm_hourly and mm_hourly.get("hourly_times"):
mm = {**mm, **mm_hourly}
risk = CITY_RISK_PROFILES.get(city, {})
network_snapshot = (
build_country_network_snapshot(city, raw)