- only clear sync status when SkuShopCategoryMap succeeded
- and DetailErrList for tasksch.
This commit is contained in:
@@ -126,6 +126,9 @@ func (task *ParallelTask) Run() {
|
||||
chanRetVal = err
|
||||
goto end
|
||||
}
|
||||
task.locker.Lock()
|
||||
task.DetailErrList = append(task.DetailErrList, err)
|
||||
task.locker.Unlock()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -176,9 +179,8 @@ func (task *ParallelTask) Run() {
|
||||
task.Result = taskResult
|
||||
task.TerminatedAt = time.Now()
|
||||
task.locker.Unlock()
|
||||
|
||||
globals.SugarLogger.Debugf("ParallelTask.Run %s, result:%v, err:%v", task.Name, taskResult, taskErr)
|
||||
|
||||
globals.SugarLogger.Debugf("ParallelTask.Run %s, err:%v", task.Name, taskErr)
|
||||
// globals.SugarLogger.Debugf("ParallelTask.Run %s, result:%v, err:%v", task.Name, taskResult, taskErr)
|
||||
close(task.subFinishChan)
|
||||
|
||||
if task.resultHandler != nil {
|
||||
|
||||
@@ -45,6 +45,9 @@ func (task *SeqTask) Run() {
|
||||
if !task.IsContinueWhenError {
|
||||
break
|
||||
}
|
||||
task.locker.Lock()
|
||||
task.DetailErrList = append(task.DetailErrList, err)
|
||||
task.locker.Unlock()
|
||||
} else if result != nil {
|
||||
taskResult = append(taskResult, utils.Interface2Slice(result)...)
|
||||
}
|
||||
|
||||
@@ -61,9 +61,10 @@ type BaseTask struct {
|
||||
FailedJobCount int `json:"failedJobCount"`
|
||||
Status int `json:"status"`
|
||||
|
||||
Result []interface{} `json:"result"`
|
||||
Err error `json:"err"`
|
||||
Children TaskList `json:"children"`
|
||||
Result []interface{} `json:"result"`
|
||||
Err error `json:"err"`
|
||||
Children TaskList `json:"children"`
|
||||
DetailErrList []error `json:"detailErrList"`
|
||||
|
||||
finishChan chan int
|
||||
C <-chan int `json:"-"`
|
||||
|
||||
Reference in New Issue
Block a user