From 933f4915419b8b538b3dbd52467c005ee6845d7f Mon Sep 17 00:00:00 2001 From: gazebo Date: Wed, 14 Nov 2018 12:26:56 +0800 Subject: [PATCH] - IsContinueWhenError true for LoopStoresMap and LoopMultiStoresVendors --- business/jxstore/cms/sync.go | 4 ++-- business/partner/purchase/ebai/store_sku.go | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/business/jxstore/cms/sync.go b/business/jxstore/cms/sync.go index 4bf79bfc7..1e54144a4 100644 --- a/business/jxstore/cms/sync.go +++ b/business/jxstore/cms/sync.go @@ -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 { diff --git a/business/partner/purchase/ebai/store_sku.go b/business/partner/purchase/ebai/store_sku.go index dc66fb0df..3699452c9 100644 --- a/business/partner/purchase/ebai/store_sku.go +++ b/business/partner/purchase/ebai/store_sku.go @@ -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 {