feat: 2.2.0
1. 修复幂等没有过滤类型为TaskTypeEnum.RETRY和状态:RetryStatusEnum.RUNNING问题
This commit is contained in:
parent
e8f001fdfb
commit
69de854fb1
@ -2,6 +2,7 @@ package com.aizuda.easy.retry.server.support.generator.task;
|
|||||||
|
|
||||||
import cn.hutool.core.lang.Assert;
|
import cn.hutool.core.lang.Assert;
|
||||||
import cn.hutool.core.lang.Pair;
|
import cn.hutool.core.lang.Pair;
|
||||||
|
import com.aizuda.easy.retry.common.core.enums.RetryStatusEnum;
|
||||||
import com.aizuda.easy.retry.common.core.log.LogUtils;
|
import com.aizuda.easy.retry.common.core.log.LogUtils;
|
||||||
import com.aizuda.easy.retry.common.core.util.JsonUtil;
|
import com.aizuda.easy.retry.common.core.util.JsonUtil;
|
||||||
import com.aizuda.easy.retry.server.enums.DelayLevelEnum;
|
import com.aizuda.easy.retry.server.enums.DelayLevelEnum;
|
||||||
@ -66,6 +67,8 @@ public abstract class AbstractGenerator implements TaskGenerator {
|
|||||||
List<RetryTask> retryTasks = retryTaskAccess.list(taskContext.getGroupName(), new LambdaQueryWrapper<RetryTask>()
|
List<RetryTask> retryTasks = retryTaskAccess.list(taskContext.getGroupName(), new LambdaQueryWrapper<RetryTask>()
|
||||||
.eq(RetryTask::getGroupName, taskContext.getGroupName())
|
.eq(RetryTask::getGroupName, taskContext.getGroupName())
|
||||||
.eq(RetryTask::getSceneName, taskContext.getSceneName())
|
.eq(RetryTask::getSceneName, taskContext.getSceneName())
|
||||||
|
.eq(RetryTask::getRetryStatus, RetryStatusEnum.RUNNING.getStatus())
|
||||||
|
.eq(RetryTask::getTaskType, TaskTypeEnum.RETRY.getType())
|
||||||
.in(RetryTask::getIdempotentId, idempotentIdSet));
|
.in(RetryTask::getIdempotentId, idempotentIdSet));
|
||||||
|
|
||||||
Map<String/*幂等ID*/, List<RetryTask>> retryTaskMap = retryTasks.stream().collect(Collectors.groupingBy(RetryTask::getIdempotentId));
|
Map<String/*幂等ID*/, List<RetryTask>> retryTaskMap = retryTasks.stream().collect(Collectors.groupingBy(RetryTask::getIdempotentId));
|
||||||
|
Loading…
Reference in New Issue
Block a user