From 45fe5dc793e8baf06c7d35e530842e5fff189828 Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Fri, 20 Apr 2018 13:01:17 +0800 Subject: [PATCH] `$redis.client` -> `$redis._client`. See https://github.com/redis/redis-rb/commit/c239abb43c2dce99468bf94652a3c48b31a1041a --- config/unicorn.conf.rb | 4 ++-- lib/discourse.rb | 2 +- lib/discourse_redis.rb | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/unicorn.conf.rb b/config/unicorn.conf.rb index e5f5c4d112a..01c800b1986 100644 --- a/config/unicorn.conf.rb +++ b/config/unicorn.conf.rb @@ -195,7 +195,7 @@ before_fork do |server, worker| sleep 10 force_kill_rogue_sidekiq end - $redis.client.disconnect + $redis._client.disconnect end end @@ -211,7 +211,7 @@ before_fork do |server, worker| end ActiveRecord::Base.connection.disconnect! - $redis.client.disconnect + $redis._client.disconnect # Throttle the master from forking too quickly by sleeping. Due # to the implementation of standard Unix signal handlers, this diff --git a/lib/discourse.rb b/lib/discourse.rb index f0846277005..0673e1f119f 100644 --- a/lib/discourse.rb +++ b/lib/discourse.rb @@ -432,7 +432,7 @@ module Discourse RailsMultisite::ConnectionManagement.establish_connection(db: current_db) MessageBus.after_fork SiteSetting.after_fork - $redis.client.reconnect + $redis._client.reconnect Rails.cache.reconnect Logster.store.redis.reconnect # shuts down all connections in the pool diff --git a/lib/discourse_redis.rb b/lib/discourse_redis.rb index 49f0a3ec1d4..800acd4980d 100644 --- a/lib/discourse_redis.rb +++ b/lib/discourse_redis.rb @@ -229,7 +229,7 @@ class DiscourseRedis end def reconnect - @redis.client.reconnect + @redis._client.reconnect end def namespace_key(key)