This commit is contained in:
苏尹岚
2020-01-08 09:09:32 +08:00
parent 8429a1e68a
commit 4f4e6698e7

View File

@@ -632,8 +632,10 @@ func (v *VendorSync) LoopStoresMap2(ctx *jxcontext.Context, db *dao.DaoDB, taskN
if len(task.GetErrMsg()) > 10 { if len(task.GetErrMsg()) > 10 {
err = WirteToExcelBySyncFailed(task, ctx) err = WirteToExcelBySyncFailed(task, ctx)
} else { } else {
if err != nil {
err = buildErrMsg(task) err = buildErrMsg(task)
} }
}
}) })
} }
tasksch.HandleTask(task, nil, isManageIt).Run() tasksch.HandleTask(task, nil, isManageIt).Run()
@@ -674,12 +676,8 @@ func buildErrMsg(task tasksch.ITask) (err error) {
} }
} }
err = fmt.Errorf(utils.Format4Output(resultL, true)) err = fmt.Errorf(utils.Format4Output(resultL, true))
if err != nil {
return makeSyncError(err)
} else {
return err return err
} }
}
func (v *VendorSync) LoopStoresMap(ctx *jxcontext.Context, db *dao.DaoDB, taskName string, isAsync, isManageIt bool, vendorIDs []int, storeIDs []int, handler tasksch.WorkFunc, isContinueWhenError bool) (hint string, err error) { func (v *VendorSync) LoopStoresMap(ctx *jxcontext.Context, db *dao.DaoDB, taskName string, isAsync, isManageIt bool, vendorIDs []int, storeIDs []int, handler tasksch.WorkFunc, isContinueWhenError bool) (hint string, err error) {
_, hint, err = v.LoopStoresMap2(ctx, db, taskName, isAsync, isManageIt, vendorIDs, storeIDs, false, handler, isContinueWhenError) _, hint, err = v.LoopStoresMap2(ctx, db, taskName, isAsync, isManageIt, vendorIDs, storeIDs, false, handler, isContinueWhenError)