From a407d4298441ab60dc8c175e0669b85b8628f8b4 Mon Sep 17 00:00:00 2001 From: Alan Guo Xiang Tan Date: Thu, 13 Jan 2022 13:59:19 +0800 Subject: [PATCH] DEV: Fix deprecation warning after updating to messabe_bus 4.0.0. ``` MessageBus.reliable_pub_sub is deprecated, use MessageBus.backend_instance instead. ``` Follow-up to aee9fcd2571516ba3c852a1858bef2e4f605cc37 --- lib/presence_channel.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/presence_channel.rb b/lib/presence_channel.rb index f2e8031c4cb..f6f9e7e9702 100644 --- a/lib/presence_channel.rb +++ b/lib/presence_channel.rb @@ -251,7 +251,7 @@ class PresenceChannel # installations, this is the same Redis server as `Discourse.redis`. def self.redis if MessageBus.backend == :redis - MessageBus.reliable_pub_sub.send(:pub_redis) # TODO: avoid a private API? + MessageBus.backend_instance.send(:pub_redis) # TODO: avoid a private API? elsif Rails.env.test? Discourse.redis.without_namespace else @@ -408,7 +408,7 @@ class PresenceChannel # TODO: Avoid using private MessageBus methods here encoded_channel_name = MessageBus.send(:encode_channel_name, message_bus_channel_name) - MessageBus.reliable_pub_sub.send(:backlog_id_key, encoded_channel_name) + MessageBus.backend_instance.send(:backlog_id_key, encoded_channel_name) end def redis_keys