| | |
| | | |
| | | @Override |
| | | public void online(ParentPlatform parentPlatform) { |
| | | logger.info("[国标级联]:{}, 平台上线", parentPlatform.getServerGBId()); |
| | | logger.info("[国标级联]:{}, 平台上线/更新注册", parentPlatform.getServerGBId()); |
| | | platformMapper.updateParentPlatformStatus(parentPlatform.getServerGBId(), true); |
| | | ParentPlatformCatch parentPlatformCatch = redisCatchStorage.queryPlatformCatchInfo(parentPlatform.getServerGBId()); |
| | | if (parentPlatformCatch != null) { |
| | |
| | | dynamicTask.startDelay(registerTaskKey, |
| | | // 注册失败(注册成功时由程序直接调用了online方法) |
| | | ()->commanderForPlatform.register(parentPlatform, eventResult -> offline(parentPlatform),null), |
| | | parentPlatform.getExpires()*1000); |
| | | (parentPlatform.getExpires() - 10) *1000); |
| | | |
| | | final String keepaliveTaskKey = KEEPALIVE_KEY_PREFIX + parentPlatform.getServerGBId(); |
| | | if (!dynamicTask.contains(keepaliveTaskKey)) { |
| | |
| | | redisCatchStorage.updatePlatformCatchInfo(platformCatch); |
| | | } |
| | | }), |
| | | parentPlatform.getExpires()*1000); |
| | | (parentPlatform.getKeepTimeout() - 10)*1000); |
| | | } |
| | | } |
| | | |
| | |
| | | param.put("stream", sendRtpItem.getStreamId()); |
| | | zlmrtpServerFactory.stopSendRtpStream(mediaInfo, param); |
| | | } |
| | | |
| | | } |
| | | } |
| | | |