Jelajahi Sumber

视频截图开启

gao.qiang 9 bulan lalu
induk
melakukan
ab80e1a5f9

+ 4 - 4
hazard-admin/src/main/java/com/ozs/web/controller/shotschedule/ShotPictureTaskExecutors.java

@@ -96,8 +96,8 @@ public class ShotPictureTaskExecutors {
     /**
      * 处理非预警摄像头截图, 间隔: 60s
      */
-//    @Async
-//    @Scheduled(fixedDelay = 60 * 1000, initialDelay = 3 * 1000)
+    @Async
+    @Scheduled(fixedDelay = 60 * 1000, initialDelay = 3 * 1000)
     public synchronized void initCameraConfig() {
         if (!isMaster) return;
         // 获取分布式锁
@@ -164,7 +164,7 @@ public class ShotPictureTaskExecutors {
     /**
      * 处理预警摄像头截图, 间隔: 5s
      */
-//    @Scheduled(fixedDelay = 5 * 1000, initialDelay = 10 * 1000)
+    @Scheduled(fixedDelay = 5 * 1000, initialDelay = 10 * 1000)
     public void batchProcess() {
         if (!isMaster) return;
         // 填充默认路径
@@ -224,7 +224,7 @@ public class ShotPictureTaskExecutors {
     /**
      * 处理预警摄像头截图, 间隔: 1s
      */
-//    @Scheduled(fixedDelay = 1 * 1000, initialDelay = 10 * 1000)
+    @Scheduled(fixedDelay = 1 * 1000, initialDelay = 10 * 1000)
     public void batchAlarmProcess() {
         if (!isMaster) return;
         // 填充默认路径