From 1654683da7d3107f4340752fac5117ae33c0215e Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: Mon, 10 Apr 2023 09:15:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=9B=BD=E6=A0=87=E7=BA=A7?= =?UTF-8?q?=E8=81=94=E5=BF=83=E8=B7=B3=E4=B8=8E=E6=B3=A8=E5=86=8C=E6=97=B6?= =?UTF-8?q?=E9=95=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../redis/{RedisConfig.java => RedisMsgListenConfig.java} | 5 +---- .../genersoft/iot/vmp/service/impl/PlatformServiceImpl.java | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) rename src/main/java/com/genersoft/iot/vmp/conf/redis/{RedisConfig.java => RedisMsgListenConfig.java} (95%) diff --git a/src/main/java/com/genersoft/iot/vmp/conf/redis/RedisConfig.java b/src/main/java/com/genersoft/iot/vmp/conf/redis/RedisMsgListenConfig.java similarity index 95% rename from src/main/java/com/genersoft/iot/vmp/conf/redis/RedisConfig.java rename to src/main/java/com/genersoft/iot/vmp/conf/redis/RedisMsgListenConfig.java index 87b4d53d..9f484266 100644 --- a/src/main/java/com/genersoft/iot/vmp/conf/redis/RedisConfig.java +++ b/src/main/java/com/genersoft/iot/vmp/conf/redis/RedisMsgListenConfig.java @@ -4,7 +4,6 @@ package com.genersoft.iot.vmp.conf.redis; import com.genersoft.iot.vmp.common.VideoManagerConstants; import com.genersoft.iot.vmp.service.redisMsg.*; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.cache.annotation.CachingConfigurerSupport; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.annotation.Order; @@ -21,7 +20,7 @@ import org.springframework.data.redis.listener.RedisMessageListenerContainer; */ @Configuration @Order(value=1) -public class RedisConfig extends CachingConfigurerSupport { +public class RedisMsgListenConfig { @Autowired private RedisGpsMsgListener redisGPSMsgListener; @@ -45,8 +44,6 @@ public class RedisConfig extends CachingConfigurerSupport { private RedisPushStreamResponseListener redisPushStreamResponseListener; - - /** * redis消息监听器容器 可以添加多个监听不同话题的redis监听器,只需要把消息监听器和相应的消息订阅处理器绑定,该消息监听器 * 通过反射技术调用消息订阅处理器的相关方法进行一些业务处理 diff --git a/src/main/java/com/genersoft/iot/vmp/service/impl/PlatformServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/service/impl/PlatformServiceImpl.java index 136689ca..bde829f8 100644 --- a/src/main/java/com/genersoft/iot/vmp/service/impl/PlatformServiceImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/service/impl/PlatformServiceImpl.java @@ -137,7 +137,7 @@ public class PlatformServiceImpl implements IPlatformService { ()-> { registerTask(parentPlatform); }, - (parentPlatform.getExpires() - 10) *1000); + parentPlatform.getExpires() *1000); } @@ -183,7 +183,7 @@ public class PlatformServiceImpl implements IPlatformService { logger.error("[命令发送失败] 国标级联 发送心跳: {}", e.getMessage()); } }, - (parentPlatform.getKeepTimeout() - 10)*1000); + parentPlatform.getKeepTimeout()*1000); } }