提交 5ff822a0 作者: 方治民

feat: 优化重试模式衰退后的计数提示及测试用例

上级 022df2b1
...@@ -42,7 +42,7 @@ public class TestJob { ...@@ -42,7 +42,7 @@ public class TestJob {
log.info("TestJobHandler: {}", time); log.info("TestJobHandler: {}", time);
Random random = new Random(); Random random = new Random();
int randomCount = random.nextInt(3); int randomCount = random.nextInt(10);
String result = retriever.execute( String result = retriever.execute(
ctx -> { ctx -> {
if (ctx.getRetryCount() > randomCount) { if (ctx.getRetryCount() > randomCount) {
......
...@@ -110,6 +110,8 @@ public class UptimePushAspect { ...@@ -110,6 +110,8 @@ public class UptimePushAspect {
// 开始重复计数 // 开始重复计数
redis.del(redisKey); redis.del(redisKey);
} else { } else {
// 追加重试次数
redis.incr(redisKey, 1);
// 追加重试衰退提示 // 追加重试衰退提示
texts.add( texts.add(
StrUtil.format( StrUtil.format(
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论