DEV: Fix undefined method in rails_failover initializer.

This commit is contained in:
Guo Xiang Tan 2020-06-11 12:30:01 +08:00
parent e7af83e1fd
commit 34ee1f2e71
No known key found for this signature in database
GPG Key ID: FBD110179AAC1F20
1 changed files with 2 additions and 2 deletions

View File

@ -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