This commit is contained in:
gazebo
2019-09-27 14:53:41 +08:00
parent 355a1ce72f
commit e6cdf9fb86

View File

@@ -1119,7 +1119,7 @@ func CheckImages(ctx *jxcontext.Context, isAsync, isContinueWhenError bool) (hin
if err = dao.GetRows(db, &imgList, `
SELECT t1.*
FROM data_resource t1
WHERE t1.use_type = 1 AND t1.remark <> ''
WHERE t1.use_type = 1
`); err == nil && len(imgList) > 0 {
calcTask := tasksch.NewParallelTask("检查京西图片的有效性",
tasksch.NewParallelConfig().SetIsContinueWhenError(isContinueWhenError).SetParallelCount(5), ctx,
@@ -1165,7 +1165,7 @@ func CheckImages(ctx *jxcontext.Context, isAsync, isContinueWhenError bool) (hin
case 1: // 检查京东商品图片
skuNameInfo, err2 := cms.GetSkuNames(ctx, "", false, map[string]interface{}{}, 0, -1)
if err = err2; err == nil && len(skuNameInfo.SkuNames) > 0 {
calcTask := tasksch.NewParallelTask("检查京西图片的有效性",
calcTask := tasksch.NewParallelTask("检查京图片的有效性",
tasksch.NewParallelConfig().SetIsContinueWhenError(isContinueWhenError).SetParallelCount(5), ctx,
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
skuName := batchItemList[0].(*model.SkuNameExt)