From 34ee1f2e714d442f247f8441e6828ee90ba67afc Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Thu, 11 Jun 2020 12:30:01 +0800 Subject: [PATCH] DEV: Fix undefined method in rails_failover initializer. --- config/initializers/002-rails_failover.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/initializers/002-rails_failover.rb b/config/initializers/002-rails_failover.rb index a48b3dda215..05f9af214ea 100644 --- a/config/initializers/002-rails_failover.rb +++ b/config/initializers/002-rails_failover.rb @@ -66,12 +66,12 @@ if ENV["ACTIVE_RECORD_RAILS_FAILOVER"] RailsFailover::ActiveRecord.register_force_reading_role_callback do begin - Discourse.redis.exists?( + Discourse.redis.exists( Discourse::PG_READONLY_MODE_KEY, Discourse::PG_FORCE_READONLY_MODE_KEY ) rescue => e - Discourse.warn_exception(e) + Discourse.warn_exception(e, message: "Failed to force AR reading role") false end end