diff --git a/src/main/java/com/genersoft/iot/vmp/conf/DynamicTask.java b/src/main/java/com/genersoft/iot/vmp/conf/DynamicTask.java index 1f18338b..1885632a 100644 --- a/src/main/java/com/genersoft/iot/vmp/conf/DynamicTask.java +++ b/src/main/java/com/genersoft/iot/vmp/conf/DynamicTask.java @@ -5,6 +5,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; +import org.springframework.scheduling.annotation.Scheduled; import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler; import org.springframework.stereotype.Component; @@ -120,4 +121,19 @@ public class DynamicTask { public Runnable get(String key) { return runnableMap.get(key); } + + /** + * 每五分钟检查失效的任务,并移除 + */ + @Scheduled(cron="0 0/5 * * * ?") + public void execute(){ + if (futureMap.size() > 0) { + for (String key : futureMap.keySet()) { + if (futureMap.get(key).isDone()) { + futureMap.remove(key); + runnableMap.remove(key); + } + } + } + } } diff --git a/src/main/java/com/genersoft/iot/vmp/domain/req/PresetQuerySipReq.java b/src/main/java/com/genersoft/iot/vmp/gb28181/bean/PresetQuerySipReq.java similarity index 91% rename from src/main/java/com/genersoft/iot/vmp/domain/req/PresetQuerySipReq.java rename to src/main/java/com/genersoft/iot/vmp/gb28181/bean/PresetQuerySipReq.java index e2f3ec62..d1971a2e 100644 --- a/src/main/java/com/genersoft/iot/vmp/domain/req/PresetQuerySipReq.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/bean/PresetQuerySipReq.java @@ -1,4 +1,4 @@ -package com.genersoft.iot.vmp.domain.req; +package com.genersoft.iot.vmp.gb28181.bean; /** diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/response/cmd/PresetQueryResponseMessageHandler.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/response/cmd/PresetQueryResponseMessageHandler.java index 36626004..45265c5b 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/response/cmd/PresetQueryResponseMessageHandler.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/response/cmd/PresetQueryResponseMessageHandler.java @@ -1,6 +1,6 @@ package com.genersoft.iot.vmp.gb28181.transmit.event.request.impl.message.response.cmd; -import com.genersoft.iot.vmp.domain.req.PresetQuerySipReq; +import com.genersoft.iot.vmp.gb28181.bean.PresetQuerySipReq; import com.genersoft.iot.vmp.gb28181.bean.*; import com.genersoft.iot.vmp.gb28181.transmit.callback.DeferredResultHolder; import com.genersoft.iot.vmp.gb28181.transmit.callback.RequestMessage; diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/media/MediaController.java b/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/media/MediaController.java index 54bd3f6a..94fe8df2 100644 --- a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/media/MediaController.java +++ b/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/media/MediaController.java @@ -35,15 +35,9 @@ public class MediaController { @Autowired private IRedisCatchStorage redisCatchStorage; - @Autowired - private IStreamPushService streamPushService; - @Autowired private IMediaService mediaService; - @Autowired - private IMediaServerService mediaServerService; - /** * 根据应用名和流id获取播放地址 diff --git a/src/main/resources/8042900_www.wvp-pro.cn.jks b/src/main/resources/8042900_www.wvp-pro.cn.jks new file mode 100644 index 00000000..3e512065 Binary files /dev/null and b/src/main/resources/8042900_www.wvp-pro.cn.jks differ