From 6d8569f340c42f511d633b5d8699e4845e071bb6 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: Tue, 12 Jul 2022 10:32:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A8=E6=80=81=E4=BA=BA=E7=89=A9=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E5=A2=9E=E5=8A=A0=E8=87=AA=E6=A3=80=E6=9C=BA=E5=88=B6?= =?UTF-8?q?=E3=80=82=E9=98=B2=E6=AD=A2=E5=86=85=E5=AD=98=E6=BA=A2=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/genersoft/iot/vmp/conf/DynamicTask.java | 16 ++++++++++++++++ .../req => gb28181/bean}/PresetQuerySipReq.java | 2 +- .../cmd/PresetQueryResponseMessageHandler.java | 2 +- .../vmanager/gb28181/media/MediaController.java | 6 ------ src/main/resources/8042900_www.wvp-pro.cn.jks | Bin 0 -> 5676 bytes 5 files changed, 18 insertions(+), 8 deletions(-) rename src/main/java/com/genersoft/iot/vmp/{domain/req => gb28181/bean}/PresetQuerySipReq.java (91%) create mode 100644 src/main/resources/8042900_www.wvp-pro.cn.jks 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 0000000000000000000000000000000000000000..3e5120652595d9e6480232fc0d0329a02552548d GIT binary patch literal 5676 zcmeH~c{Ei2|HtpWvskiZi6RWy8rz*2ONcCE$&#HW%9bsRZ4fFElcj|s5+aJ2_@E-Y zWQodBSwfO1TlJBWweL*Zr_bm7e&_o;=XcKcpKo){Ju|QSe$DH3&%Lkvd_3RlbL(>e z06^al5MXik@p2B5^L7gZ05GcR#Q8}8KtXUcavkPCv&x`BB#4E$KoA8Wqmk41j94k& zv2Xg#jJ<`29+SwykuoKMmYQ>ic(&f0DVsq%oRD$bMr@l6X)|>_%(q$MhONJkl_nfh z7`Az*1v{cWVq(~7y3hAs6|?6)n*w0m!c_#MZp%fo28$1-UzEcO4?aEqL%yteHR_HGJtdv8>F z&BJ!%gb0-?M^RykG-8TWRJEM0GRfxrOmp|XlO*4VIXT;W6K7nE4-(#u*Of1MxAMu` zaqVHxe;L_j7O$IHtsfG9!$QbKDJCFDLsGlwPmI+z3!rQNt_~m9EmrU->t@qtuy(l8h+wn{V+q^l2ON!@WTkrpJP6E^ut;VL#&@LF& z;KzcJgUKV}0WY4Mh(4Lr$;X`MbIOmh@@nJW@|i&p;ywZoecSTB14XjBjZeCY|I*#|p}ygIG1RDCH+BaZX!Y}g5-b1K7H(ME;v*x_ogLE}SQ zlrMKj6;-T_SDhYczYq_8e41>~37>xM7U#a&JzlKl*)PLeWFOTjQmS&f8u= zL9rJT%){gHm{t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