mirror of
https://gitee.com/durcframework/SOP.git
synced 2025-08-11 12:56:28 +08:00
修复admin后台发布文档不生效问题;业务服务启动不用依赖网关
This commit is contained in:
@@ -2,8 +2,6 @@ package com.gitee.sop.support.register;
|
|||||||
|
|
||||||
import com.gitee.sop.support.service.ApiRegisterService;
|
import com.gitee.sop.support.service.ApiRegisterService;
|
||||||
import com.gitee.sop.support.service.dto.RegisterDTO;
|
import com.gitee.sop.support.service.dto.RegisterDTO;
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
@@ -44,17 +42,11 @@ public class ApiRegisterRunner {
|
|||||||
private static void retry(List<RegisterDTO> registerDTOS) {
|
private static void retry(List<RegisterDTO> registerDTOS) {
|
||||||
try {
|
try {
|
||||||
apiRegister.reg(registerDTOS);
|
apiRegister.reg(registerDTOS);
|
||||||
// 注册成功
|
// 注册成功,关闭定时器
|
||||||
scheduledExecutorService.shutdown();
|
scheduledExecutorService.shutdown();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.warn("注册接口失败,{}秒后进行重试", PERIOD, e);
|
log.warn("注册接口失败,{}秒后进行重试, errorMsg={}", PERIOD, e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@AllArgsConstructor
|
|
||||||
@Data
|
|
||||||
static class RetryContext {
|
|
||||||
String appName;
|
|
||||||
Collection<Object> objects;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user