优化客服CK重登流程

This commit is contained in:
yml2213
2026-08-14 14:43:21 +08:00
parent 1ed1eac205
commit bf2f78aa70
10 changed files with 550 additions and 162 deletions
+4
View File
@@ -30,6 +30,7 @@ async def lifespan(app: FastAPI):
from loguru import logger
from .database import SessionLocal
from .services.login_service import cleanup_orphan_relogin_tasks
from .services.huya_service import cleanup_orphan_huya_tasks
from .services.douyu_service import cleanup_orphan_douyu_tasks
@@ -41,6 +42,9 @@ async def lifespan(app: FastAPI):
cleaned_douyu = cleanup_orphan_douyu_tasks(db, message="任务已中断(服务重启)")
if cleaned_douyu:
logger.info(f"启动清理斗鱼残留任务: {cleaned_douyu}")
cleaned_relogin = cleanup_orphan_relogin_tasks(db)
if cleaned_relogin:
logger.info(f"启动清理 CK 重登残留任务: {cleaned_relogin}")
from .services.yyb_service import cleanup_orphan_yyb_tasks
cleaned_yyb = cleanup_orphan_yyb_tasks(db, message="任务已中断(服务重启)")
if cleaned_yyb: