- add parentTask.
This commit is contained in:
@@ -190,7 +190,7 @@ func (p *PurchaseHandler) GetAllStoresFromRemote() ([]*model.Store, error) {
|
||||
return nil, 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("jd RefreshAllStoresID")
|
||||
|
||||
var stores []*tJdStoreInfo
|
||||
@@ -228,7 +228,7 @@ func (p *PurchaseHandler) RefreshAllStoresID(ctx *jxcontext.Context, isAsync boo
|
||||
return nil, err
|
||||
}, 3)
|
||||
|
||||
ctx.SetTaskOrAddChild(rootTask)
|
||||
ctx.SetTaskOrAddChild(rootTask, parentTask)
|
||||
rootTask.Run()
|
||||
if !isAsync {
|
||||
_, err = rootTask.GetResult(0)
|
||||
|
||||
Reference in New Issue
Block a user