ソースを参照

fix bug:更改定时任务

lijie 3 年 前
コミット
a9d97a44c9

+ 2 - 1
revit-algorithm/src/main/kotlin/cn/sagacloud/server/algorithm/backstage/BackMainThread.kt

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