- tasksch.NewParallelTask2,支持部分失败时得到准备的成功,失败个数信息
This commit is contained in:
@@ -65,12 +65,12 @@ func (p *PurchaseHandler) getStoreSkusBareInfoLimitSize(ctx *jxcontext.Context,
|
||||
}
|
||||
|
||||
func (p *PurchaseHandler) GetStoreSkusBareInfo(ctx *jxcontext.Context, parentTask tasksch.ITask, storeID int, vendorStoreID string, inStoreSkuList []*partner.StoreSkuInfo) (outStoreSkuList []*partner.StoreSkuInfo, err error) {
|
||||
result, err := putils.FreeBatchStoreSkuInfo(func(task tasksch.ITask, batchedStoreSkuList []*partner.StoreSkuInfo) (result interface{}, err error) {
|
||||
result, err := putils.FreeBatchStoreSkuInfo(func(task tasksch.ITask, batchedStoreSkuList []*partner.StoreSkuInfo) (result interface{}, successCount int, err error) {
|
||||
list, err := p.getStoreSkusBareInfoLimitSize(ctx, task, storeID, vendorStoreID, batchedStoreSkuList)
|
||||
if err == nil {
|
||||
result = list
|
||||
}
|
||||
return result, err
|
||||
return result, len(list), err
|
||||
}, ctx, parentTask, inStoreSkuList, jdapi.MaxStoreSkuBatchSize, true)
|
||||
for _, v := range result {
|
||||
outStoreSkuList = append(outStoreSkuList, v.(*partner.StoreSkuInfo))
|
||||
|
||||
Reference in New Issue
Block a user