mirror of
https://gitee.com/pan648540858/wvp-GB28181-pro.git
synced 2026-05-26 15:07:49 +08:00
Compare commits
3 Commits
2a3342a955
...
791152611f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
791152611f | ||
|
|
416dac382e | ||
|
|
da98101aac |
@ -50,14 +50,6 @@ public class SipSubscribe {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateTimeout(String callId) {
|
|
||||||
SipEvent sipEvent = subscribes.get(callId);
|
|
||||||
if (sipEvent != null) {
|
|
||||||
delayQueue.remove(sipEvent);
|
|
||||||
delayQueue.offer(sipEvent);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface Event { void response(EventResult eventResult);
|
public interface Event { void response(EventResult eventResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -94,7 +94,10 @@ public class DeviceStatusTaskRunner {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
log.debug("[更新状态任务时间] 编号: {}", key);
|
log.debug("[更新状态任务时间] 编号: {}", key);
|
||||||
|
// 如果值更改时间,如果队列中有多个元素时 超时无法出发。目前采用移除再加入的方法
|
||||||
|
delayQueue.remove(task);
|
||||||
task.setDelayTime(expirationTime);
|
task.setDelayTime(expirationTime);
|
||||||
|
delayQueue.offer(task);
|
||||||
String redisKey = String.format("%s_%s_%s", prefix, userSetting.getServerId(), task.getDeviceId());
|
String redisKey = String.format("%s_%s_%s", prefix, userSetting.getServerId(), task.getDeviceId());
|
||||||
Duration duration = Duration.ofSeconds((expirationTime - System.currentTimeMillis())/1000);
|
Duration duration = Duration.ofSeconds((expirationTime - System.currentTimeMillis())/1000);
|
||||||
redisTemplate.expire(redisKey, duration);
|
redisTemplate.expire(redisKey, duration);
|
||||||
|
|||||||
@ -94,7 +94,9 @@ public class SubscribeTaskRunner{
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
log.info("[更新订阅任务时间] {}, 编号: {}", task.getName(), key);
|
log.info("[更新订阅任务时间] {}, 编号: {}", task.getName(), key);
|
||||||
|
delayQueue.remove(task);
|
||||||
task.setDelayTime(expirationTime);
|
task.setDelayTime(expirationTime);
|
||||||
|
delayQueue.offer(task);
|
||||||
String redisKey = String.format("%s_%s_%s", prefix, userSetting.getServerId(), task.getKey());
|
String redisKey = String.format("%s_%s_%s", prefix, userSetting.getServerId(), task.getKey());
|
||||||
Duration duration = Duration.ofSeconds((expirationTime - System.currentTimeMillis())/1000);
|
Duration duration = Duration.ofSeconds((expirationTime - System.currentTimeMillis())/1000);
|
||||||
redisTemplate.expire(redisKey, duration);
|
redisTemplate.expire(redisKey, duration);
|
||||||
|
|||||||
@ -108,19 +108,6 @@ public class PlatformStatusTaskRunner {
|
|||||||
return task.getSipTransactionInfo();
|
return task.getSipTransactionInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean updateRegisterDelay(String platformServerId, long expirationTime) {
|
|
||||||
PlatformRegisterTask task = registerSubscribes.get(platformServerId);
|
|
||||||
if (task == null) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
log.info("[更新平台注册任务时间] 平台上级编号: {}", platformServerId);
|
|
||||||
task.setDelayTime(expirationTime);
|
|
||||||
String redisKey = String.format("%s_%s_%s", prefix, userSetting.getServerId(), platformServerId);
|
|
||||||
Duration duration = Duration.ofSeconds((expirationTime - System.currentTimeMillis())/1000);
|
|
||||||
redisTemplate.expire(redisKey, duration);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean containsRegister(String platformServerId) {
|
public boolean containsRegister(String platformServerId) {
|
||||||
return registerSubscribes.containsKey(platformServerId);
|
return registerSubscribes.containsKey(platformServerId);
|
||||||
}
|
}
|
||||||
@ -152,16 +139,6 @@ public class PlatformStatusTaskRunner {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean updateKeepAliveDelay(String platformServerId, long expirationTime) {
|
|
||||||
PlatformKeepaliveTask task = keepaliveSubscribes.get(platformServerId);
|
|
||||||
if (task == null) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
log.info("[更新平台心跳任务时间] 平台上级编号: {}", platformServerId);
|
|
||||||
task.setDelayTime(expirationTime);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean containsKeepAlive(String platformServerId) {
|
public boolean containsKeepAlive(String platformServerId) {
|
||||||
return keepaliveSubscribes.containsKey(platformServerId);
|
return keepaliveSubscribes.containsKey(platformServerId);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -861,7 +861,7 @@
|
|||||||
320623,如东县,3206
|
320623,如东县,3206
|
||||||
320681,启东市,3206
|
320681,启东市,3206
|
||||||
320682,如皋市,3206
|
320682,如皋市,3206
|
||||||
320684,海门市,3206
|
320684,海门区,3206
|
||||||
320685,海安市,3206
|
320685,海安市,3206
|
||||||
3207,连云港市,32
|
3207,连云港市,32
|
||||||
320703,连云区,3207
|
320703,连云区,3207
|
||||||
@ -918,8 +918,6 @@
|
|||||||
33,浙江省,
|
33,浙江省,
|
||||||
3301,杭州市,33
|
3301,杭州市,33
|
||||||
330102,上城区,3301
|
330102,上城区,3301
|
||||||
330103,下城区,3301
|
|
||||||
330104,江干区,3301
|
|
||||||
330105,拱墅区,3301
|
330105,拱墅区,3301
|
||||||
330106,西湖区,3301
|
330106,西湖区,3301
|
||||||
330108,滨江区,3301
|
330108,滨江区,3301
|
||||||
@ -927,6 +925,8 @@
|
|||||||
330110,余杭区,3301
|
330110,余杭区,3301
|
||||||
330111,富阳区,3301
|
330111,富阳区,3301
|
||||||
330112,临安区,3301
|
330112,临安区,3301
|
||||||
|
330113,临平区,3301
|
||||||
|
330114,钱塘区,3301
|
||||||
330122,桐庐县,3301
|
330122,桐庐县,3301
|
||||||
330127,淳安县,3301
|
330127,淳安县,3301
|
||||||
330182,建德市,3301
|
330182,建德市,3301
|
||||||
|
|||||||
|
Loading…
Reference in New Issue
Block a user