优化客服CK重登流程
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user