bug修复
parent
b957ab61c7
commit
76dedb11f8
|
@ -160,7 +160,7 @@ public class DeviceServiceImpl implements IDeviceService {
|
|||
logger.info("[添加目录订阅] 设备{}", device.getDeviceId());
|
||||
// 添加目录订阅
|
||||
CatalogSubscribeTask catalogSubscribeTask = new CatalogSubscribeTask(device, sipCommander, dynamicTask);
|
||||
// 提前开始刷新订阅
|
||||
// 刷新订阅
|
||||
int subscribeCycleForCatalog = Math.max(device.getSubscribeCycleForCatalog(),30);
|
||||
// 设置最小值为30
|
||||
dynamicTask.startCron(device.getDeviceId() + "catalog", catalogSubscribeTask, (subscribeCycleForCatalog -1) * 1000);
|
||||
|
@ -195,8 +195,8 @@ public class DeviceServiceImpl implements IDeviceService {
|
|||
MobilePositionSubscribeTask mobilePositionSubscribeTask = new MobilePositionSubscribeTask(device, sipCommander, dynamicTask);
|
||||
// 设置最小值为30
|
||||
int subscribeCycleForCatalog = Math.max(device.getSubscribeCycleForMobilePosition(),30);
|
||||
// 提前开始刷新订阅
|
||||
dynamicTask.startCron(device.getDeviceId() + "mobile_position" , mobilePositionSubscribeTask, (subscribeCycleForCatalog -1 ) * 1000);
|
||||
// 刷新订阅
|
||||
dynamicTask.startCron(device.getDeviceId() + "mobile_position" , mobilePositionSubscribeTask, (subscribeCycleForCatalog) * 1000);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -57,11 +57,16 @@ public class RedisPushStreamStatusMsgListener implements MessageListener, Applic
|
|||
|
||||
@Override
|
||||
public void onMessage(Message message, byte[] bytes) {
|
||||
// TODO 增加队列
|
||||
logger.warn("[REDIS 消息-推流设备状态变化]: {}", new String(message.getBody()));
|
||||
//
|
||||
PushStreamStatusChangeFromRedisDto statusChangeFromPushStream = JSON.parseObject(message.getBody(), PushStreamStatusChangeFromRedisDto.class);
|
||||
if (statusChangeFromPushStream == null) {
|
||||
logger.warn("[REDIS 消息]推流设备状态变化消息解析失败");
|
||||
return;
|
||||
}
|
||||
// 取消定时任务
|
||||
dynamicTask.stop(VideoManagerConstants.VM_MSG_GET_ALL_ONLINE_REQUESTED);
|
||||
if (statusChangeFromPushStream.isSetAllOffline()) {
|
||||
// 所有设备离线
|
||||
streamPushService.allStreamOffline();
|
||||
|
|
Loading…
Reference in New Issue