add:NDC自动重连

This commit is contained in:
2025-09-23 14:56:39 +08:00
parent 77097cbda3
commit c77bce593f

View File

@@ -0,0 +1,26 @@
package org.nl.system.service.quartz.task;
import lombok.extern.slf4j.Slf4j;
import org.nl.acs.auto.run.AutoRunService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* NDC自动重连
*/
@Slf4j
@Component
public class NdcAutoReconnection {
@Autowired
AutoRunService autoRunService;
public void run(String threadCode) throws Exception {
String[] threadCodes = threadCode.split(",");
for (String code : threadCodes) {
if (!autoRunService.getThreadByCode(code).isAlive()) {
autoRunService.startThread(code);
}
}
}
}