|
|
@@ -1,6 +1,7 @@ |
|
|
|
package com.hz.pm.api.scheduler.task; |
|
|
|
|
|
|
|
import cn.hutool.core.collection.CollUtil; |
|
|
|
import cn.hutool.core.date.StopWatch; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
import com.google.common.collect.Lists; |
|
|
|
import com.google.common.collect.Sets; |
|
|
@@ -58,6 +59,9 @@ public class EarlyWarningProjectTask { |
|
|
|
|
|
|
|
@Scheduled(fixedDelay = 5, initialDelay = 5, timeUnit = TimeUnit.MINUTES) |
|
|
|
public void doEarlyWarningDeclared() { |
|
|
|
log.info("=========== 预警项目状态校验任务开始 ==========="); |
|
|
|
StopWatch stopWatch = new StopWatch(); |
|
|
|
stopWatch.start(); |
|
|
|
List<Project> projects = projectService.list(Wrappers.lambdaQuery(Project.class) |
|
|
|
.eq(Project::getNewest, Boolean.TRUE)); |
|
|
|
|
|
|
@@ -86,6 +90,8 @@ public class EarlyWarningProjectTask { |
|
|
|
return; |
|
|
|
} |
|
|
|
checkNormal(trueWarnings); |
|
|
|
stopWatch.stop(); |
|
|
|
log.info("=========== 预警项目状态校验任务结束 耗时{}s", stopWatch.getTotalTimeSeconds()); |
|
|
|
} |
|
|
|
|
|
|
|
// 3.去查询 各个报警 是否已经正常 |
|
|
|