瀏覽代碼

截图定时优化

wyyay 7 月之前
父節點
當前提交
5db02ec9c4

+ 1 - 1
hazard-admin/src/main/java/com/ozs/web/controller/shotschedule/CaptureStreamListener.java

@@ -103,7 +103,7 @@ public class CaptureStreamListener implements StreamListener<String, ObjectRecor
         } finally {
             Boolean isAlarm = vo.getIsAlarm();
             if (isAlarm) {
-                vo.setNextExecuteTime(DateTime.now().offset(DateField.SECOND, 30).toString("yyyy-MM-dd HH:mm:ss"));
+                vo.setNextExecuteTime(DateTime.now().offset(DateField.SECOND, 1).toString("yyyy-MM-dd HH:mm:ss"));
             } else {
                 vo.setNextExecuteTime(DateTime.now().offset(DateField.MINUTE, 1).toString("yyyy-MM-dd HH:mm:ss"));
             }

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

@@ -157,7 +157,7 @@ public class ShotPictureTaskExecutors {
     /**
      * 处理预警摄像头截图, 间隔: 5s
      */
-    @Scheduled(fixedDelay = 5 * 1000, initialDelay = 10 * 1000)
+    @Scheduled(fixedDelay = 1 * 1000, initialDelay = 10 * 1000)
     public void batchProcess() {
         if (!isMaster) return;
         // 填充默认路径