- 整理tasksch

This commit is contained in:
gazebo
2019-08-01 20:07:39 +08:00
parent 76d1817348
commit 402e60ab50
3 changed files with 21 additions and 19 deletions

View File

@@ -311,7 +311,7 @@ func (t *BaseTask) GetLeafResult() (finishedItemCount, failedItemCount int) {
}
func (t *BaseTask) Error() (errMsg string) {
if t.mainErr == nil && len(t.batchErrList) == 0 {
if t.GetErr() == nil {
return ""
}
t.locker.RLock()
@@ -397,7 +397,7 @@ func (t *BaseTask) run(taskHandler func()) {
task.locker.Unlock()
task.Error()
globals.SugarLogger.Debugf("Task:%s, result:%v, err:%v", task.Name, task.Result, task.mainErr)
globals.SugarLogger.Debugf("Task:%s, mainErr:%v, batchErrList:%v", task.Name, task.mainErr, task.batchErrList)
select {
case <-t.quitChan: