投票重试间隔递增

main 71
hshansha 1 month ago
parent 394ba10cc5
commit 40502d7d63

@ -202,8 +202,7 @@ public class KhVoteEmpServiceImpl implements IKhVoteEmpService {
// if (retryCount < MAX_RETRY_COUNT) {
// 等待一段时间后重试,避免立即重试导致的持续冲突
try {
Thread.sleep(100); // 重试间隔递增
//Thread.sleep(200 * retryCount); // 重试间隔递增
Thread.sleep(100* retryCount); // 重试间隔递增
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new RuntimeException("重试过程被中断-------------", e);
@ -236,8 +235,7 @@ public class KhVoteEmpServiceImpl implements IKhVoteEmpService {
// if (retryCount < MAX_RETRY_COUNT) {
// 等待一段时间后重试,避免立即重试导致的持续冲突
try {
Thread.sleep(100); // 重试间隔递增
//Thread.sleep(200 * retryCount); // 重试间隔递增
Thread.sleep(100* retryCount); // 重试间隔递增
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new RuntimeException("重试过程被中断-------------", e);
@ -269,8 +267,7 @@ public class KhVoteEmpServiceImpl implements IKhVoteEmpService {
// if (retryCount < MAX_RETRY_COUNT) {
// 等待一段时间后重试,避免立即重试导致的持续冲突
try {
Thread.sleep(100); // 重试间隔递增
//Thread.sleep(200 * retryCount); // 重试间隔递增
Thread.sleep(100* retryCount); // 重试间隔递增
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new RuntimeException("重试过程被中断-------------", e);

Loading…
Cancel
Save