fix: 改造标准预警模块定时执行的逻辑

This commit is contained in:
zhangyanduan
2022-06-23 14:27:53 +08:00
parent 8fb63876c9
commit 29f6374474
3 changed files with 69 additions and 39 deletions
@@ -0,0 +1,29 @@
package com.adc.da.scheduled;
import com.adc.da.common.GetBeanUtil;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@Slf4j
public class WarningSchedulingTasks implements Runnable{
Logger logger = LoggerFactory.getLogger(WarningSchedulingTasks.class);
private ScheduledJob scheduledJob;
public WarningSchedulingTasks() {
scheduledJob= GetBeanUtil.getApplicationContext().getBean(ScheduledJob.class);
}
@Override
public void run() {
try{
Thread.sleep(2000);
scheduledJob.warningSchedulingTasks();
}catch(Exception e){
logger.info(e.getMessage());
}
}
}