refactoring

pull/4879/head
Nikita Koksharov 2 years ago
parent ac89d45c90
commit d6e560e33d

@ -474,8 +474,10 @@ public class RedissonExecutorService implements RScheduledExecutorService {
public void shutdown() { public void shutdown() {
queueTransferService.remove(getName()); queueTransferService.remove(getName());
remoteService.deregister(RemoteExecutorService.class); remoteService.deregister(RemoteExecutorService.class);
workersTopic.removeListener(workersGroupListenerId); if (workersGroupListenerId > 0) {
workersTopic.removeListener(workersGroupListenerId);
}
commandExecutor.get(commandExecutor.evalWriteAsync(getName(), LongCodec.INSTANCE, RedisCommands.EVAL_VOID, commandExecutor.get(commandExecutor.evalWriteAsync(getName(), LongCodec.INSTANCE, RedisCommands.EVAL_VOID,
"if redis.call('exists', KEYS[2]) == 0 then " "if redis.call('exists', KEYS[2]) == 0 then "
+ "if redis.call('get', KEYS[1]) == '0' or redis.call('exists', KEYS[1]) == 0 then " + "if redis.call('get', KEYS[1]) == '0' or redis.call('exists', KEYS[1]) == 0 then "

@ -524,7 +524,7 @@ public class PublishSubscribeService {
public void remove(MasterSlaveEntry entry) { public void remove(MasterSlaveEntry entry) {
entry2PubSubConnection.remove(entry); entry2PubSubConnection.remove(entry);
name2entry.values().remove(entry); name2entry.values().forEach(v -> v.remove(entry));
} }
public CompletableFuture<Codec> unsubscribe(ChannelName channelName, PubSubType topicType) { public CompletableFuture<Codec> unsubscribe(ChannelName channelName, PubSubType topicType) {

Loading…
Cancel
Save