多模型逐时数据兜底:analysis 缓存无 hourly 时直接调 fetch_multi_model
This commit is contained in:
@@ -751,6 +751,10 @@ def _analyze(
|
|||||||
ens_raw = {}
|
ens_raw = {}
|
||||||
if not isinstance(mm, dict):
|
if not isinstance(mm, dict):
|
||||||
mm = {}
|
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, {})
|
risk = CITY_RISK_PROFILES.get(city, {})
|
||||||
network_snapshot = (
|
network_snapshot = (
|
||||||
build_country_network_snapshot(city, raw)
|
build_country_network_snapshot(city, raw)
|
||||||
|
|||||||
Reference in New Issue
Block a user