- add parentTask.
This commit is contained in:
@@ -181,7 +181,7 @@ func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin
|
||||
return err
|
||||
}
|
||||
|
||||
func (p *PurchaseHandler) RefreshAllStoresID(ctx *jxcontext.Context, isAsync bool) (hint string, err error) {
|
||||
func (p *PurchaseHandler) RefreshAllStoresID(ctx *jxcontext.Context, parentTask tasksch.ITask, isAsync bool) (hint string, err error) {
|
||||
globals.SugarLogger.Debugf("ebai RefreshAllStoresID")
|
||||
const batchSize = 50
|
||||
const stepCount = 3
|
||||
@@ -223,7 +223,7 @@ func (p *PurchaseHandler) RefreshAllStoresID(ctx *jxcontext.Context, isAsync boo
|
||||
return nil, err
|
||||
}, stepCount)
|
||||
|
||||
ctx.SetTaskOrAddChild(rootTask)
|
||||
ctx.SetTaskOrAddChild(rootTask, parentTask)
|
||||
rootTask.Run()
|
||||
if !isAsync {
|
||||
_, err = rootTask.GetResult(0)
|
||||
|
||||
Reference in New Issue
Block a user