[集群-自动切换过国标级联] 修复BUG
This commit is contained in:
@@ -191,7 +191,7 @@ public interface IRedisCatchStorage {
|
||||
|
||||
ServerInfo queryServerInfo(String serverId);
|
||||
|
||||
String chooseOneServer();
|
||||
String chooseOneServer(String serverId);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -545,8 +545,9 @@ public class RedisCatchStorageImpl implements IRedisCatchStorage {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String chooseOneServer() {
|
||||
public String chooseOneServer(String serverId) {
|
||||
String key = VideoManagerConstants.WVP_SERVER_LIST;
|
||||
redisTemplate.opsForZSet().remove(key, serverId);
|
||||
Set<Object> range = redisTemplate.opsForZSet().range(key, 0, 0);
|
||||
if (range == null || range.isEmpty()) {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user