修复网站 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:
+6
-1
@@ -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")),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user