修复网站 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
+6 -1
View File
@@ -35,4 +35,9 @@ __all__ = [
if __name__ == "__main__":
import uvicorn
uvicorn.run(app, host="0.0.0.0", port=8000)
uvicorn.run(
"web.app:app",
host="0.0.0.0",
port=8000,
workers=int(os.getenv("UVICORN_WORKERS", "4")),
)