扫描终端缓存缺失概率分布时自动强制刷新,确保所有城市产生市场扫描行

This commit is contained in:
2569718930@qq.com
2026-05-25 06:01:35 +08:00
parent 90f9beb139
commit 0affe08798
+9
View File
@@ -138,12 +138,21 @@ def _scan_city_terminal_rows(
*,
force_refresh: bool = False,
) -> Dict[str, Any]:
# Try cached analysis first; force-refresh if probability distribution is missing
data = _analyze(
city,
force_refresh=force_refresh,
include_llm_commentary=False,
detail_mode="market",
)
probs = data.get("probabilities") or {}
if not probs.get("distribution") and not force_refresh:
data = _analyze(
city,
force_refresh=True,
include_llm_commentary=False,
detail_mode="market",
)
target_dates = _resolve_time_range_dates(data, filters["time_range"])
rows: List[Dict[str, Any]] = []
primary_scores: List[float] = []