diff --git a/backend/services/task.go b/backend/services/task.go index 14a609ad..e862c36e 100644 --- a/backend/services/task.go +++ b/backend/services/task.go @@ -302,9 +302,11 @@ func SaveTaskResultCount(id string) func() { // 执行任务 func ExecuteTask(id int) { - if flag, _ := LockList.Load(id); flag.(bool) { - log.Debugf(GetWorkerPrefix(id) + "正在执行任务...") - return + if flag, ok := LockList.Load(id); ok { + if flag.(bool) { + log.Debugf(GetWorkerPrefix(id) + "正在执行任务...") + } + } // 上锁