mirror of
https://gitee.com/pan648540858/wvp-GB28181-pro.git
synced 2026-05-23 05:37:48 +08:00
[集群-自动切换过国标级联] 修复BUG
This commit is contained in:
parent
0566bf916f
commit
347b2a6a4c
@ -117,10 +117,16 @@ public class PlatformServiceImpl implements IPlatformService {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
serverIds.forEach(serverId -> {
|
serverIds.forEach(serverId -> {
|
||||||
log.info("[集群] 检测到 {} 已离线", serverId);
|
|
||||||
// 检查每个是否存活
|
// 检查每个是否存活
|
||||||
ServerInfo serverInfo = redisCatchStorage.queryServerInfo(serverId);
|
ServerInfo serverInfo = redisCatchStorage.queryServerInfo(serverId);
|
||||||
if (serverInfo == null && userSetting.getServerId().equals(redisCatchStorage.chooseOneServer(serverId))) {
|
if (serverInfo != null) {
|
||||||
|
return;
|
||||||
|
}else {
|
||||||
|
log.info("[集群] 检测到 {} 已离线", serverId);
|
||||||
|
String chooseServerId = redisCatchStorage.chooseOneServer(serverId);
|
||||||
|
if (!userSetting.getServerId().equals(chooseServerId)){
|
||||||
|
return;
|
||||||
|
}
|
||||||
// 此平台需要选择新平台处理, 确定由当前平台即开始处理
|
// 此平台需要选择新平台处理, 确定由当前平台即开始处理
|
||||||
List<Platform> platformList = platformMapper.queryByServerId(serverId);
|
List<Platform> platformList = platformMapper.queryByServerId(serverId);
|
||||||
platformList.forEach(platform -> {
|
platformList.forEach(platform -> {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user