增加自检跳过机制:TMS_SELFCHECK_SKIP=true
This commit is contained in:
parent
a177277f04
commit
37337526c3
@ -18,12 +18,21 @@ public class SelfCheckStartupRunner implements CommandLineRunner {
|
||||
@Autowired
|
||||
private SelfCheckService selfCheckService;
|
||||
|
||||
private static final String SELFCHECK_SKIP_ENV = "TMS_SELFCHECK_SKIP";
|
||||
|
||||
@Override
|
||||
public void run(String... args) throws Exception {
|
||||
log.info("══════════════════════════════════════════════════════════════");
|
||||
log.info(" 系统启动自检流程");
|
||||
log.info("══════════════════════════════════════════════════════════════");
|
||||
|
||||
String skipSelfCheck = System.getenv(SELFCHECK_SKIP_ENV);
|
||||
if ("true".equalsIgnoreCase(skipSelfCheck)) {
|
||||
log.warn("检测到环境变量 {}=true,跳过自检流程", SELFCHECK_SKIP_ENV);
|
||||
log.info("══════════════════════════════════════════════════════════════");
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
List<SelfCheckResult> results = selfCheckService.executeAllChecks();
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user