- add parentTask.

This commit is contained in:
gazebo
2018-10-24 11:11:40 +08:00
parent f050ec926b
commit 5811d3cb68
12 changed files with 45 additions and 35 deletions

View File

@@ -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)