1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package com.flightfeather.monitor.scheduledtasks
 
import com.flightfeather.monitor.analysis.dust.ExceptionAnalysisController
import org.springframework.stereotype.Component
import java.time.LocalDateTime
 
@Component
class DustExceptionAnalysisTask(private val exceptionAnalysisController: ExceptionAnalysisController) :
    BaseTimingTask() {
 
    override val period: Long = 15
 
    override fun execute(localtime: LocalDateTime) {
//        println("异常分析轮询")
//        println(localtime)
        if (localtime.hour == 8 && localtime.minute == 0) {
            doTask(localtime)
        }
    }
 
    override fun doTask(localtime: LocalDateTime) {
        log.info("异常分析执行")
        exceptionAnalysisController.init()
        exceptionAnalysisController.autoRun()
    }
}