diff --git a/easy-retry-client-core/pom.xml b/easy-retry-client-core/pom.xml
index 3bd485971..582e63005 100644
--- a/easy-retry-client-core/pom.xml
+++ b/easy-retry-client-core/pom.xml
@@ -60,7 +60,7 @@
com.caucho
hessian
- 4.0.60
+ 4.0.66
io.netty
diff --git a/easy-retry-server/pom.xml b/easy-retry-server/pom.xml
index 9494008cd..6199983d8 100644
--- a/easy-retry-server/pom.xml
+++ b/easy-retry-server/pom.xml
@@ -57,12 +57,12 @@
net.javacrumbs.shedlock
shedlock-provider-jdbc-template
- 5.2.0
+ 4.0.1
net.javacrumbs.shedlock
shedlock-spring
- 5.2.0
+ 4.0.1
mysql
diff --git a/easy-retry-server/src/main/java/com/aizuda/easy/retry/server/support/dispatch/actor/exec/ExecUnitActor.java b/easy-retry-server/src/main/java/com/aizuda/easy/retry/server/support/dispatch/actor/exec/ExecUnitActor.java
index a9933d991..3343842aa 100644
--- a/easy-retry-server/src/main/java/com/aizuda/easy/retry/server/support/dispatch/actor/exec/ExecUnitActor.java
+++ b/easy-retry-server/src/main/java/com/aizuda/easy/retry/server/support/dispatch/actor/exec/ExecUnitActor.java
@@ -2,8 +2,8 @@ package com.aizuda.easy.retry.server.support.dispatch.actor.exec;
import akka.actor.AbstractActor;
import cn.hutool.core.util.IdUtil;
-import com.x.retry.client.model.DispatchRetryDTO;
-import com.x.retry.client.model.DispatchRetryResultDTO;
+import com.aizuda.easy.retry.client.model.DispatchRetryDTO;
+import com.aizuda.easy.retry.client.model.DispatchRetryResultDTO;
import com.aizuda.easy.retry.common.core.constant.SystemConstants;
import com.aizuda.easy.retry.common.core.log.LogUtils;
import com.aizuda.easy.retry.common.core.model.Result;
diff --git a/easy-retry-server/src/main/java/com/aizuda/easy/retry/server/support/retry/RetryBuilder.java b/easy-retry-server/src/main/java/com/aizuda/easy/retry/server/support/retry/RetryBuilder.java
index aae237222..3d34c9905 100644
--- a/easy-retry-server/src/main/java/com/aizuda/easy/retry/server/support/retry/RetryBuilder.java
+++ b/easy-retry-server/src/main/java/com/aizuda/easy/retry/server/support/retry/RetryBuilder.java
@@ -10,7 +10,7 @@ import org.springframework.util.CollectionUtils;
import java.util.*;
/**
- * 重试构建这
+ * 重试构建
*
* @author: www.byteblogs.com
* @date : 2021-11-29 18:42
diff --git a/easy-retry-server/src/main/java/com/aizuda/easy/retry/server/support/retry/RetryExecutor.java b/easy-retry-server/src/main/java/com/aizuda/easy/retry/server/support/retry/RetryExecutor.java
index 3abd4ea46..20678dfd5 100644
--- a/easy-retry-server/src/main/java/com/aizuda/easy/retry/server/support/retry/RetryExecutor.java
+++ b/easy-retry-server/src/main/java/com/aizuda/easy/retry/server/support/retry/RetryExecutor.java
@@ -6,6 +6,7 @@ import com.aizuda.easy.retry.server.support.FilterStrategy;
import com.aizuda.easy.retry.server.support.RetryContext;
import com.aizuda.easy.retry.server.support.StopStrategy;
import com.aizuda.easy.retry.server.support.WaitStrategy;
+import lombok.extern.slf4j.Slf4j;
import java.util.List;
import java.util.concurrent.Callable;
@@ -16,17 +17,18 @@ import java.util.concurrent.Callable;
* @author: www.byteblogs.com
* @date : 2021-11-29 18:57
*/
+@Slf4j
public class RetryExecutor {
- private StopStrategy stopStrategy;
- private WaitStrategy waitStrategy;
- private List filterStrategies;
- private RetryContext retryContext;
+ private final StopStrategy stopStrategy;
+ private final WaitStrategy waitStrategy;
+ private final List filterStrategies;
+ private final RetryContext retryContext;
public RetryExecutor(StopStrategy stopStrategy,
WaitStrategy waitStrategy,
List filterStrategies,
- RetryContext retryContext) {
+ RetryContext retryContext) {
this.stopStrategy = stopStrategy;
this.waitStrategy = waitStrategy;
this.filterStrategies = filterStrategies;
@@ -37,8 +39,6 @@ public class RetryExecutor {
for (FilterStrategy filterStrategy : filterStrategies) {
if (!filterStrategy.filter(retryContext)) {
-
-
return false;
}
}
@@ -55,8 +55,13 @@ public class RetryExecutor {
*/
public V call(Callable callable) throws Exception {
- // 调用重试
- V call = callable.call();
+ // 这里调用客户端可能会出现网络异常
+ V call = null;
+ try {
+ call = callable.call();
+ } catch (Exception e) {
+ log.error("客户端执行失败: [{}]", retryContext.getRetryTask());
+ }
retryContext.setCallResult(call);
diff --git a/easy-retry-server/src/main/java/com/aizuda/easy/retry/server/support/strategy/StopStrategies.java b/easy-retry-server/src/main/java/com/aizuda/easy/retry/server/support/strategy/StopStrategies.java
index 259240385..134615c4f 100644
--- a/easy-retry-server/src/main/java/com/aizuda/easy/retry/server/support/strategy/StopStrategies.java
+++ b/easy-retry-server/src/main/java/com/aizuda/easy/retry/server/support/strategy/StopStrategies.java
@@ -1,6 +1,6 @@
package com.aizuda.easy.retry.server.support.strategy;
-import com.x.retry.client.model.DispatchRetryResultDTO;
+import com.aizuda.easy.retry.client.model.DispatchRetryResultDTO;
import com.aizuda.easy.retry.common.core.enums.RetryResultStatusEnum;
import com.aizuda.easy.retry.common.core.enums.StatusEnum;
import com.aizuda.easy.retry.common.core.model.Result;
@@ -45,8 +45,13 @@ public class StopStrategies {
(MaxAttemptsPersistenceRetryContext>) retryContext;
Result response = context.getCallResult();
+
+ if (Objects.isNull(response) || StatusEnum.YES.getStatus() != response.getStatus()) {
+ return Boolean.FALSE;
+ }
+
DispatchRetryResultDTO data = response.getData();
- if (StatusEnum.YES.getStatus() != response.getStatus() || Objects.isNull(data)) {
+ if (Objects.isNull(data)) {
return Boolean.FALSE;
}
diff --git a/easy-retry-server/src/main/resources/application.yml b/easy-retry-server/src/main/resources/application.yml
index 97704d1a4..a111982f0 100644
--- a/easy-retry-server/src/main/resources/application.yml
+++ b/easy-retry-server/src/main/resources/application.yml
@@ -2,7 +2,7 @@ spring:
profiles:
active: dev
datasource:
- name: x_retry
+ name: easy_retry
url: jdbc:mysql://localhost:3306/x_retry?useSSL=false&characterEncoding=utf8&useUnicode=true
username: root
password: root
@@ -17,11 +17,12 @@ spring:
pool-name: x_retry
max-lifetime: 1800000
connection-test-query: SELECT 1
- resources:
- static-locations: classpath:admin/
+ web:
+ resources:
+ static-locations: classpath:admin/
mybatis-plus:
mapper-locations: classpath:/mapper/*.xml
- typeAliasesPackage: com.x.retry.server.persistence.mybatis.po
+ typeAliasesPackage: com.aizuda.easy.retry.server.persistence.mybatis.po
global-config:
db-config:
field-strategy: NOT_EMPTY