feat(account): 合并上传按钮

This commit is contained in:
cnlimiter
2026-03-18 19:08:53 +08:00
parent ff2d15ff14
commit 881e724463
4 changed files with 140 additions and 36 deletions

View File

@@ -160,6 +160,13 @@ def create_app() -> FastAPI:
async def startup_event():
"""应用启动事件"""
import asyncio
from ..database.init_db import initialize_database
# 确保数据库已初始化reload 模式下子进程也需要初始化)
try:
initialize_database()
except Exception as e:
logger.warning(f"数据库初始化: {e}")
# 设置 TaskManager 的事件循环
loop = asyncio.get_event_loop()