- 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

@@ -254,7 +254,7 @@ func (p *PurchaseHandler) DeleteSku(db *dao.DaoDB, sku *model.Sku, userName stri
return err
}
func (p *PurchaseHandler) RefreshAllSkusID(ctx *jxcontext.Context, isAsync bool) (hint string, err error) {
func (p *PurchaseHandler) RefreshAllSkusID(ctx *jxcontext.Context, parentTask tasksch.ITask, isAsync bool) (hint string, err error) {
globals.SugarLogger.Debugf("jd RefreshAllSkusID")
db := dao.GetDB()
@@ -295,7 +295,7 @@ func (p *PurchaseHandler) RefreshAllSkusID(ctx *jxcontext.Context, isAsync bool)
}
return nil, err
}, 3)
ctx.SetTaskOrAddChild(rootTask)
ctx.SetTaskOrAddChild(rootTask, parentTask)
rootTask.Run()
if !isAsync {
_, err = rootTask.GetResult(0)