修复网站 API 阻塞与积分同步问题

- uvicorn 改用 import string 格式启动 4 workers,防止数据采集阻塞 event loop
- prewarm 去掉 --force-refresh,仅依赖缓存预热避免每 5 分钟全量采集
- 积分变动时同步写入 Supabase user_metadata,避免前端回退路径失败时显示 0 积分
- /api/auth/me 积分解析增加 Supabase email 回退路径
This commit is contained in:
2569718930@qq.com
2026-05-16 13:15:30 +08:00
parent 884a7899f3
commit b27bedbca3
4 changed files with 133 additions and 13 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ services:
container_name: polyweather_prewarm
restart: unless-stopped
profiles: ["workers"]
command: python scripts/prewarm_dashboard_worker.py --include-detail --include-market --force-refresh
command: python scripts/prewarm_dashboard_worker.py --include-detail --include-market
volumes:
- ${POLYWEATHER_RUNTIME_DATA_DIR:-/var/lib/polyweather}:/var/lib/polyweather
- ${POLYWEATHER_RUNTIME_DATA_DIR:-/var/lib/polyweather}:/app/data