- when IsContinueWhenError is true, if partial failed, mark the whole task as failed.

This commit is contained in:
gazebo
2018-10-27 18:00:02 +08:00
parent 0743df73b2
commit 7a93cf745d
4 changed files with 56 additions and 12 deletions

View File

@@ -127,7 +127,7 @@ func (task *ParallelTask) Run() {
goto end
}
task.locker.Lock()
task.DetailErrList = append(task.DetailErrList, NewTaskError(err))
task.detailErrMsgList = append(task.detailErrMsgList, err.Error())
task.locker.Unlock()
}
}
@@ -177,6 +177,8 @@ func (task *ParallelTask) Run() {
}
if taskErr != nil {
task.Err = NewTaskError(taskErr)
} else {
task.Err = task.buildTaskErrFromDetail()
}
task.Result = taskResult
task.TerminatedAt = time.Now()