diff --git a/business/netspider/netspider.go b/business/netspider/netspider.go index 958748911..8a2137df6 100644 --- a/business/netspider/netspider.go +++ b/business/netspider/netspider.go @@ -23,7 +23,7 @@ const ( func GetCityShops(ctx *jxcontext.Context, parentTask tasksch.ITask, vendorIDs []int, cityCode, radius, gridWith int) (pageStoreList []*model.PageShop, err error) { coordList := ditu.GetCityCoordinateList(cityCode, radius, gridWith) if len(coordList) > 0 { - task := tasksch.NewParallelTask("GetCityShops", tasksch.NewParallelConfig().SetIsContinueWhenError(true), ctx, + task := tasksch.NewParallelTask(fmt.Sprintf("GetCityShops:%d", cityCode), tasksch.NewParallelConfig().SetIsContinueWhenError(true), ctx, func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) { vendorID := batchItemList[0].(int) storeList, err2 := getStoreListByCoordinates(ctx, task, vendorID, utils.Int2Str(cityCode), coordList) @@ -126,7 +126,7 @@ func GetAndStoreCitiesShops(ctx *jxcontext.Context, vendorIDs []int, cityCodeLis gridWith = DefGridWith } - task := tasksch.NewParallelTask("GetAndStoreCitiesShops", tasksch.NewParallelConfig().SetParallelCount(1).SetIsContinueWhenError(true), ctx, + 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)