DEV: Avoid logging Redis cannot connect error during failover.

Reduce amount of noise in our logs.
This commit is contained in:
Guo Xiang Tan 2020-07-21 14:53:07 +08:00
parent de5245631b
commit 23778f4bfd
No known key found for this signature in database
GPG Key ID: FBD110179AAC1F20
1 changed files with 1 additions and 1 deletions

View File

@ -57,7 +57,7 @@ if defined?(RailsFailover::ActiveRecord)
Discourse::PG_FORCE_READONLY_MODE_KEY
)
rescue => e
if e.is_a?(Redis::CannotConnectError)
if !e.is_a?(Redis::CannotConnectError)
Rails.logger.warn "#{e.class} #{e.message}: #{e.backtrace.join("\n")}"
end