删除日志
This commit is contained in:
@@ -31,7 +31,6 @@ func GetCityShops(ctx *jxcontext.Context, parentTask tasksch.ITask, vendorIDs []
|
||||
if err = err2; err == nil {
|
||||
retVal = storeList
|
||||
}
|
||||
globals.SugarLogger.Debugf("GetCityShops vendorID:%d, cityCode:%d, len(storeList):%d, err:%v", vendorID, cityCode, len(storeList), err)
|
||||
return retVal, err
|
||||
}, vendorIDs)
|
||||
tasksch.AddChild(parentTask, task).Run()
|
||||
@@ -173,7 +172,6 @@ func GetAndStoreCitiesShops(ctx *jxcontext.Context, vendorIDs []int, cityCodeLis
|
||||
cityCodeList2 = append(cityCodeList2, cityCodeList[:index]...)
|
||||
cityCodeList = cityCodeList2
|
||||
}
|
||||
globals.SugarLogger.Debugf("GetAndStoreCitiesShops last cityCode:%d, cityCodeList:%v", lastShop.CityCode, cityCodeList)
|
||||
} else {
|
||||
globals.SugarLogger.Debugf("GetAndStoreCitiesShops get lastest city code error:%v", err2)
|
||||
}
|
||||
@@ -191,10 +189,9 @@ func GetAndStoreCitiesShops(ctx *jxcontext.Context, vendorIDs []int, cityCodeLis
|
||||
task := tasksch.NewParallelTask(fmt.Sprintf("GetAndStoreCitiesShops:%v", vendorIDs), tasksch.NewParallelConfig().SetParallelCount(1).SetIsContinueWhenError(true), ctx,
|
||||
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
||||
cityCode := batchItemList[0].(int)
|
||||
globals.SugarLogger.Debugf("process city:%d", cityCode)
|
||||
shopList, err := GetCityShops(ctx, task, vendorIDs, cityCode, radius, gridWith)
|
||||
if err == nil {
|
||||
txDB , _ := dao.Begin(db)
|
||||
txDB, _ := dao.Begin(db)
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
dao.Rollback(db, txDB)
|
||||
@@ -222,7 +219,6 @@ func GetAndStoreCitiesShops(ctx *jxcontext.Context, vendorIDs []int, cityCodeLis
|
||||
dao.Commit(db, txDB)
|
||||
}
|
||||
}
|
||||
globals.SugarLogger.Debugf("process city:%d, len(shopList):%d, err:%v", cityCode, len(shopList), err)
|
||||
return nil, err
|
||||
}, cityCodeList)
|
||||
tasksch.ManageTask(task).Run()
|
||||
|
||||
Reference in New Issue
Block a user