perf: 优化数据库连接池和HTTP客户端复用 1.连接池50+30支持150-200并发 2.HTTP客户端全局复用减少开销 3.前端UI优化和默认章节调整
This commit is contained in:
@@ -49,7 +49,14 @@ async def lifespan(app: FastAPI):
|
||||
|
||||
# 清理MCP插件
|
||||
await mcp_registry.cleanup_all()
|
||||
|
||||
# 清理HTTP客户端池
|
||||
from app.services.ai_service import cleanup_http_clients
|
||||
await cleanup_http_clients()
|
||||
|
||||
# 关闭数据库连接
|
||||
await close_db()
|
||||
|
||||
logger.info("应用已关闭")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user