升级版本

This commit is contained in:
byteblogs168 2024-04-16 08:49:09 +08:00
parent 12d72439ad
commit 68c719cfe8
9 changed files with 26 additions and 30 deletions

View File

@ -44,17 +44,17 @@
<dependency>
<groupId>com.aizuda</groupId>
<artifactId>easy-retry-client-starter</artifactId>
<version>3.2.0</version>
<version>3.3.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.aizuda</groupId>
<artifactId>easy-retry-client-core</artifactId>
<version>3.2.0</version>
<version>3.3.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.aizuda</groupId>
<artifactId>easy-retry-client-job-core</artifactId>
<version>3.2.0</version>
<version>3.3.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.freemarker</groupId>

View File

@ -18,9 +18,9 @@ import org.springframework.stereotype.Component;
public class TestWorkflowAnnoJobExecutor {
public ExecuteResult jobExecute(JobArgs jobArgs) throws InterruptedException {
for (int i = 0; i < 30; i++) {
EasyRetryLog.REMOTE.info("任务执行开始. [{}]", i + "" + JsonUtil.toJsonString(jobArgs));
}
// for (int i = 0; i < 30; i++) {
// EasyRetryLog.REMOTE.info("任务执行开始. [{}]", i + "" + JsonUtil.toJsonString(jobArgs));
// }
FailOrderPo failOrderPo = new FailOrderPo();
failOrderPo.setOrderId("xiaowoniu");
return ExecuteResult.success(failOrderPo);

View File

@ -1,6 +1,6 @@
package com.example.easy.retry.listener;
import com.aizuda.easy.retry.client.common.event.ChannelReconnectEvent;
import com.aizuda.easy.retry.client.common.event.SnailChannelReconnectEvent;
import com.aizuda.easy.retry.common.log.EasyRetryLog;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;
@ -11,9 +11,9 @@ import org.springframework.stereotype.Component;
* @since 3.1.0
*/
@Component
public class EasyRetryChannelReconnectListener implements ApplicationListener<ChannelReconnectEvent> {
public class EasyRetryChannelReconnectListener implements ApplicationListener<SnailChannelReconnectEvent> {
@Override
public void onApplicationEvent(ChannelReconnectEvent event) {
public void onApplicationEvent(SnailChannelReconnectEvent event) {
EasyRetryLog.LOCAL.info("这个一个重连事件");
}
}

View File

@ -1,7 +1,6 @@
package com.example.easy.retry.listener;
import com.aizuda.easy.retry.client.common.event.EasyRetryClosedEvent;
import com.aizuda.easy.retry.client.common.event.EasyRetryStartedEvent;
import com.aizuda.easy.retry.client.common.event.SnailClientClosedEvent;
import com.aizuda.easy.retry.common.log.EasyRetryLog;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;
@ -12,9 +11,9 @@ import org.springframework.stereotype.Component;
* @since 3.1.0
*/
@Component
public class EasyRetryClosedListener implements ApplicationListener<EasyRetryClosedEvent> {
public class EasyRetryClosedListener implements ApplicationListener<SnailClientClosedEvent> {
@Override
public void onApplicationEvent(EasyRetryClosedEvent event) {
public void onApplicationEvent(SnailClientClosedEvent event) {
EasyRetryLog.LOCAL.info("这是一个EasyRetry关闭完成事件");
}
}

View File

@ -1,7 +1,6 @@
package com.example.easy.retry.listener;
import com.aizuda.easy.retry.client.common.event.EasyRetryClosingEvent;
import com.aizuda.easy.retry.client.common.event.EasyRetryStartedEvent;
import com.aizuda.easy.retry.client.common.event.SnailClientClosingEvent;
import com.aizuda.easy.retry.common.log.EasyRetryLog;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;
@ -12,9 +11,9 @@ import org.springframework.stereotype.Component;
* @since 3.1.0
*/
@Component
public class EasyRetryClosingListener implements ApplicationListener<EasyRetryClosingEvent> {
public class EasyRetryClosingListener implements ApplicationListener<SnailClientClosingEvent> {
@Override
public void onApplicationEvent(EasyRetryClosingEvent event) {
public void onApplicationEvent(SnailClientClosingEvent event) {
EasyRetryLog.LOCAL.info("这是一个EasyRetry开始关闭事件");
}
}

View File

@ -1,7 +1,6 @@
package com.example.easy.retry.listener;
import com.aizuda.easy.retry.client.common.event.EasyRetryStartedEvent;
import com.aizuda.easy.retry.client.common.event.EasyRetryStartingEvent;
import com.aizuda.easy.retry.client.common.event.SnailClientStartedEvent;
import com.aizuda.easy.retry.common.log.EasyRetryLog;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;
@ -12,9 +11,9 @@ import org.springframework.stereotype.Component;
* @since 3.1.0
*/
@Component
public class EasyRetryStartedListener implements ApplicationListener<EasyRetryStartedEvent> {
public class EasyRetryStartedListener implements ApplicationListener<SnailClientStartedEvent> {
@Override
public void onApplicationEvent(EasyRetryStartedEvent event) {
public void onApplicationEvent(SnailClientStartedEvent event) {
EasyRetryLog.LOCAL.info("这是一个EasyRetry启动完成事件");
}
}

View File

@ -1,7 +1,6 @@
package com.example.easy.retry.listener;
import com.aizuda.easy.retry.client.common.event.ChannelReconnectEvent;
import com.aizuda.easy.retry.client.common.event.EasyRetryStartingEvent;
import com.aizuda.easy.retry.client.common.event.SnailClientStartingEvent;
import com.aizuda.easy.retry.common.log.EasyRetryLog;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;
@ -12,9 +11,9 @@ import org.springframework.stereotype.Component;
* @since 3.1.0
*/
@Component
public class EasyRetryStartingListener implements ApplicationListener<EasyRetryStartingEvent> {
public class EasyRetryStartingListener implements ApplicationListener<SnailClientStartingEvent> {
@Override
public void onApplicationEvent(EasyRetryStartingEvent event) {
public void onApplicationEvent(SnailClientStartingEvent event) {
EasyRetryLog.LOCAL.info("这是一个EasyRetry启动事件");
}
}

View File

@ -38,9 +38,9 @@ mybatis-plus:
logging:
config: classpath:logback-boot.xml
easy-retry:
snail-job:
server:
host: 127.0.0.1
port: 1788
namespace: 764d604ec6fc45f68cd92514c40e9e1a
token: ER_cKqBTPzCsWA3VyuCfFoccmuIEGXjr5KT
token: ER_Wyz3dmsdbDOkDujOTSSoBjGQP1BMsVnj

View File

@ -78,8 +78,8 @@
<appender-ref ref ="fileError"/>
</appender>
<!-- EasyRetry appender -->
<appender name="easyLogAppender" class="com.aizuda.easy.retry.client.common.appender.EasyRetryLogbackAppender">
<!-- Snail appender -->
<appender name="snailLogAppender" class="com.aizuda.easy.retry.client.common.appender.SnailLogbackAppender">
</appender>
<!-- 控制台输出日志级别 -->
@ -88,6 +88,6 @@
<appender-ref ref="asyncInfo" />
<appender-ref ref="asyncWarn" />
<appender-ref ref="asyncError" />
<appender-ref ref="easyLogAppender" />
<appender-ref ref="snailLogAppender" />
</root>
</configuration>