|
@@ -4,7 +4,6 @@ import cn.sagacloud.server.algorithm.backstage.state.*
|
|
import org.slf4j.LoggerFactory
|
|
import org.slf4j.LoggerFactory
|
|
import org.springframework.beans.factory.annotation.Autowired
|
|
import org.springframework.beans.factory.annotation.Autowired
|
|
import org.springframework.scheduling.annotation.EnableScheduling
|
|
import org.springframework.scheduling.annotation.EnableScheduling
|
|
-import org.springframework.scheduling.annotation.Scheduled
|
|
|
|
import org.springframework.stereotype.Component
|
|
import org.springframework.stereotype.Component
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -54,7 +53,7 @@ class BackMainThread {
|
|
* 定时任务, 处理它们的状态, 当前未完成时, 不会执行下一个scheduled
|
|
* 定时任务, 处理它们的状态, 当前未完成时, 不会执行下一个scheduled
|
|
*/
|
|
*/
|
|
//@Scheduled(cron = "0 0/1 * * * ?")
|
|
//@Scheduled(cron = "0 0/1 * * * ?")
|
|
- @Scheduled(fixedRate = 1000 * 60 * 3, initialDelay = 1000)
|
|
|
|
|
|
+ //@Scheduled(fixedRate = 1000 * 60 * 3, initialDelay = 1000)
|
|
fun run() {
|
|
fun run() {
|
|
if(states.isEmpty()) {
|
|
if(states.isEmpty()) {
|
|
// states.addAll(arrayListOf(state31, state3))
|
|
// states.addAll(arrayListOf(state31, state3))
|
|
@@ -62,7 +61,6 @@ class BackMainThread {
|
|
states.addAll(arrayListOf(state0, state1, state10, state11, state2, state20, state21, state31, state3, state4))
|
|
states.addAll(arrayListOf(state0, state1, state10, state11, state2, state20, state21, state31, state3, state4))
|
|
}
|
|
}
|
|
states.forEach { modelState ->
|
|
states.forEach { modelState ->
|
|
- modelState.prepareModel()
|
|
|
|
modelState.handle()
|
|
modelState.handle()
|
|
}
|
|
}
|
|
}
|
|
}
|