feat(recommend): 手动执行推荐缓存服务时强刷数据

This commit is contained in:
景大侠
2026-02-13 18:09:08 +08:00
parent bf7cc6caf0
commit c86659428f
2 changed files with 15 additions and 6 deletions

View File

@@ -615,7 +615,10 @@ def run_scheduler(jobid: str,
"""
if not jobid:
return schemas.Response(success=False, message="命令不能为空!")
Scheduler().start(jobid)
if jobid in {"recommend_refresh", "cookiecloud"}:
Scheduler().start(jobid, manual=True)
else:
Scheduler().start(jobid)
return schemas.Response(success=True)
@@ -628,5 +631,8 @@ def run_scheduler2(jobid: str,
if not jobid:
return schemas.Response(success=False, message="命令不能为空!")
Scheduler().start(jobid)
if jobid in {"recommend_refresh", "cookiecloud"}:
Scheduler().start(jobid, manual=True)
else:
Scheduler().start(jobid)
return schemas.Response(success=True)