feat: 2.0.3
1. 优化迁移代码逻辑
This commit is contained in:
parent
a320cbb266
commit
e99ba2ef1e
@ -33,7 +33,6 @@ import com.aizuda.easy.retry.server.service.convert.RetryTaskConverter;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.PageDTO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -233,6 +232,7 @@ public class RetryServiceImpl implements RetryService {
|
||||
waitDelDeadLetters.addAll(finishCallbackRetryIdList);
|
||||
}
|
||||
|
||||
RequestDataHelper.setPartition(groupName);
|
||||
Assert.isTrue(waitDelDeadLetters.size() == retryTaskMapper.deleteBatchIds(waitDelDeadLetters),
|
||||
() -> new EasyRetryServerException("删除重试数据失败 [{}]", JsonUtil.toJsonString(retryTasks)));
|
||||
|
||||
@ -246,6 +246,9 @@ public class RetryServiceImpl implements RetryService {
|
||||
* @param retryTasks 待迁移数据
|
||||
*/
|
||||
private void moveDeadLetters(String groupName, List<RetryTask> retryTasks) {
|
||||
if (CollectionUtils.isEmpty(retryTasks)) {
|
||||
return;
|
||||
}
|
||||
|
||||
List<RetryDeadLetter> retryDeadLetters = RetryDeadLetterConverter.INSTANCE.toRetryDeadLetter(retryTasks);
|
||||
|
||||
|
2
pom.xml
2
pom.xml
@ -21,7 +21,7 @@
|
||||
<java.version>1.8</java.version>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
<revision>2.0.2</revision>
|
||||
<revision>2.0.3-SNAPSHOT</revision>
|
||||
<dingding-talk.version>1.0.0</dingding-talk.version>
|
||||
<hibernate-validator.version>5.4.2.Final</hibernate-validator.version>
|
||||
<netty-all.version>4.1.48.Final</netty-all.version>
|
||||
|
Loading…
Reference in New Issue
Block a user