Quellcode durchsuchen

预警项目状态校验任务增加日志

tags/24090101
CMM vor 2 Monaten
Ursprung
Commit
ae93ce82f3
1 geänderte Dateien mit 6 neuen und 0 gelöschten Zeilen
  1. +6
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/scheduler/task/EarlyWarningProjectTask.java

+ 6
- 0
hz-pm-api/src/main/java/com/hz/pm/api/scheduler/task/EarlyWarningProjectTask.java Datei anzeigen

@@ -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.去查询 各个报警 是否已经正常


Laden…
Abbrechen
Speichern