add:NDC自动重连
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user