fix(platform-fulfillment): 释放空闲连接并合并选号请求

This commit is contained in:
yml
2026-11-21 17:35:34 +08:00
parent f74573a9c0
commit 7f7943a1e8
17 changed files with 690 additions and 74 deletions
+2 -1
View File
@@ -57,7 +57,7 @@ async def lifespan(app: FastAPI):
# 进程重启后内存批次丢失,清理历史 pending/running,避免前端被假活跃批次锁死。
from loguru import logger
from .database import SessionLocal
from .database import SessionLocal, dispose_engines
from .services.douyu_service import cleanup_orphan_douyu_tasks
from .services.huya_service import cleanup_orphan_huya_tasks
from .services.login_service import (
@@ -138,6 +138,7 @@ async def lifespan(app: FastAPI):
stop_integration_outbox_worker()
stop_scheduler()
shutdown_task_runtime(wait=False)
dispose_engines()
app = FastAPI(