feat: 将任务查询数量改为可配置环境变量 TASK_QUERY_LIMIT

This commit is contained in:
CaIon
2025-12-03 19:27:15 +08:00
parent 7d1bad1b37
commit 0b9f6a58bc
3 changed files with 4 additions and 1 deletions

View File

@@ -29,7 +29,7 @@ func UpdateTaskBulk() {
time.Sleep(time.Duration(15) * time.Second)
common.SysLog("任务进度轮询开始")
ctx := context.TODO()
allTasks := model.GetAllUnFinishSyncTasks(500)
allTasks := model.GetAllUnFinishSyncTasks(constant.TaskQueryLimit)
platformTask := make(map[constant.TaskPlatform][]*model.Task)
for _, t := range allTasks {
platformTask[t.Platform] = append(platformTask[t.Platform], t)