- add param isContinueWhenError for SyncStoresSkus.
This commit is contained in:
@@ -74,9 +74,9 @@ var (
|
||||
}
|
||||
)
|
||||
|
||||
func (p *PurchaseHandler) SyncStoreSkus(ctx *jxcontext.Context, parentTask tasksch.ITask, storeID int, skuIDs []int, isAsync bool) (hint string, err error) {
|
||||
func (p *PurchaseHandler) SyncStoreSkus(ctx *jxcontext.Context, parentTask tasksch.ITask, storeID int, skuIDs []int, isAsync, isContinueWhenError bool) (hint string, err error) {
|
||||
userName := ctx.GetUserName()
|
||||
globals.SugarLogger.Debugf("SyncStoreSkus storeID:%d, skuIDs:%v, userName:%s", storeID, skuIDs, userName)
|
||||
globals.SugarLogger.Debugf("SyncStoreSkus storeID:%d, skuIDs:%v, isContinueWhenError:%t, userName:%s", storeID, skuIDs, isContinueWhenError, userName)
|
||||
db := dao.GetDB()
|
||||
|
||||
if err = p.SyncLocalStoreCategory(db, storeID, userName); err != nil {
|
||||
@@ -138,7 +138,7 @@ func (p *PurchaseHandler) SyncStoreSkus(ctx *jxcontext.Context, parentTask tasks
|
||||
return "", err
|
||||
}
|
||||
if err = dao.GetRows(db, &storeSkuInfoList, sql, sqlParams...); err == nil {
|
||||
task := tasksch.NewParallelTask("SyncStoreSkus skus", nil, userName, func(t *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
||||
task := tasksch.NewParallelTask("SyncStoreSkus skus", tasksch.NewParallelConfig().SetIsContinueWhenError(isContinueWhenError), userName, func(t *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
||||
storeSku := batchItemList[0].(*tStoreSkuFullInfo)
|
||||
updateFields := []string{model.FieldEbaiSyncStatus}
|
||||
isCreate := false
|
||||
|
||||
Reference in New Issue
Block a user