60s 轮询扩展:跑道曲线 + 站点观测同步刷新

原来只轮询 summary 拿 current.temp 更新数字。
现在同时 fetch detail?depth=full 合并 amos/runway_plate_history/
airport_primary_today_obs 等字段,跑道曲线和站点线每 60s 刷新。
后端 CITY_FULL_CACHE_TTL_SEC=60 保证轻量命中缓存。
This commit is contained in:
2569718930@qq.com
2026-05-26 09:46:36 +08:00
parent 6e6d27f323
commit dd72908e0e
3 changed files with 86 additions and 17 deletions
@@ -38,8 +38,8 @@ export function runTests() {
"selected city detail chart cache should align with 5-minute scan/metar cadence",
);
assert(
chartSource.includes("setInterval(fetchLiveTemp, 60_000)"),
"selected city chart should poll live temperature every 60 seconds via lightweight summary endpoint",
chartSource.includes("setInterval(poll, 60_000)"),
"selected city chart should poll live temperature and runway curves every 60 seconds",
);
assert(
chartSource.includes("_hourlyRequestCache") &&