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()
|
}
|
}
|