|
@@ -102,13 +102,16 @@ 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"));
|
|
|
}
|
|
|
vo.setStatus("complete");
|
|
|
redisService.addToHash(isAlarm ? ShotPictureTaskExecutors.CAMERA_ALARM_HASH :
|
|
|
ShotPictureTaskExecutors.CAMERA_NORMAL_HASH, vo.getCameraCode(), vo);
|
|
|
+ if(isAlarm){
|
|
|
+ redisService.addToHash(ShotPictureTaskExecutors.CAMERA_ALARM_HASH,vo.getCameraCode(),vo);
|
|
|
+ }
|
|
|
ShotPictureTaskExecutors.RUNNING_ATOMIC_INT.decrementAndGet();
|
|
|
}
|
|
|
}
|