调整任务进度跟踪器, 改为从数据库获取执行进度:
修bug
This commit is contained in:
@@ -243,8 +243,9 @@ func (s *Scheduler) processTask(claimedLog *models.TaskExecutionLog) {
|
||||
return
|
||||
}
|
||||
|
||||
// 如果此计划执行中已没有其他“等待中”或“进行中”的任务,则认为计划已完成
|
||||
if incompleteCount == 0 {
|
||||
// 如果此计划执行中,未完成的任务只剩下当前这一个(因为当前任务的状态此时在数据库中仍为 'started'),
|
||||
// 则认为整个计划已完成。
|
||||
if incompleteCount == 1 {
|
||||
s.logger.Infof("计划执行 %d 的所有任务已完成,开始处理计划完成逻辑...", claimedLog.PlanExecutionLogID)
|
||||
|
||||
// 通过 PlanExecutionLog 反查正确的顶层 PlanID
|
||||
|
||||
Reference in New Issue
Block a user