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

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