图表叠加超时 500→3000ms,避免 SQLite 锁竞争下的误跳过

This commit is contained in:
2569718930@qq.com
2026-06-16 15:17:47 +08:00
parent aad917ccb6
commit 2a38a19f18
+3 -3
View File
@@ -77,11 +77,11 @@ def _city_detail_batch_response_cache_ttl() -> float:
def _city_chart_optional_overlay_timeout_sec() -> float:
try:
timeout_ms = int(
os.getenv("POLYWEATHER_CITY_CHART_OPTIONAL_OVERLAY_TIMEOUT_MS", "2000")
or "2000"
os.getenv("POLYWEATHER_CITY_CHART_OPTIONAL_OVERLAY_TIMEOUT_MS", "3000")
or "3000"
)
except ValueError:
timeout_ms = 2000
timeout_ms = 3000
return max(0.001, min(3.0, timeout_ms / 1000.0))