- IsContinueWhenError true for LoopStoresMap and LoopMultiStoresVendors
This commit is contained in:
@@ -375,7 +375,7 @@ func (v *VendorSync) LoopStoresMap(ctx *jxcontext.Context, db *dao.DaoDB, taskNa
|
||||
}
|
||||
index++
|
||||
}
|
||||
task := tasksch.NewParallelTask(taskName, nil, ctx.GetUserName(), handler, loopInfoList)
|
||||
task := tasksch.NewParallelTask(taskName, tasksch.NewParallelConfig().SetIsContinueWhenError(true), ctx.GetUserName(), handler, loopInfoList)
|
||||
ctx.SetTaskOrAddChild(task, nil)
|
||||
tasksch.ManageTask(task).Run()
|
||||
if !isAsync {
|
||||
@@ -385,7 +385,7 @@ func (v *VendorSync) LoopStoresMap(ctx *jxcontext.Context, db *dao.DaoDB, taskNa
|
||||
}
|
||||
|
||||
func (v *VendorSync) LoopMultiStoresVendors(ctx *jxcontext.Context, db *dao.DaoDB, taskName string, isAsync bool, userName string, handler tasksch.WorkFunc) (hint string, err error) {
|
||||
task := tasksch.NewParallelTask(taskName, nil, userName, handler, v.MultiStoreVendorIDs)
|
||||
task := tasksch.NewParallelTask(taskName, tasksch.NewParallelConfig().SetIsContinueWhenError(true), userName, handler, v.MultiStoreVendorIDs)
|
||||
ctx.SetTaskOrAddChild(task, nil)
|
||||
tasksch.ManageTask(task).Run()
|
||||
if !isAsync {
|
||||
|
||||
@@ -187,6 +187,7 @@ func (p *PurchaseHandler) SyncStoreSkus(ctx *jxcontext.Context, parentTask tasks
|
||||
}
|
||||
}
|
||||
if num != 0 {
|
||||
globals.SugarLogger.Infof("SyncStoreSkus 不能创建商品所需的类别, storeID:%d, skuIDs:%v, isContinueWhenError:%t, userName:%s", storeID, skuIDs, isContinueWhenError, userName)
|
||||
return nil, errors.New("不能创建商品所需的类别")
|
||||
}
|
||||
} else if step == 1 {
|
||||
|
||||
Reference in New Issue
Block a user