INNER CODE UNIT · Python

health_check

RMA-MUN/RAGNotebook · backend/main.py:83

async def health_check():
    return {"message": "The service is healthy"}


@app.on_event("startup")
async def startup_event():
    """应用启动时初始化会话管理器"""
    # 初始化数据库表结构(自动创建/迁移)
    await init_db()
    logger.info("数据库表结构初始化完成")

    # 确保测试用户存在
    await seed_test_user()

    # 使用数据库版本的会话管理器
    await init_database_session_manager()
    logger.info("数据库会话管理器初始化完成")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…