mirror of
https://github.com/discourse/discourse.git
synced 2025-02-20 18:58:10 +00:00
DEV: Avoid logging errors on bad Redis connection during PG failover.
This commit is contained in:
parent
89bac20b8e
commit
2c4c953bf8
@ -55,7 +55,10 @@ if defined?(RailsFailover::ActiveRecord)
|
||||
Discourse::PG_FORCE_READONLY_MODE_KEY
|
||||
)
|
||||
rescue => e
|
||||
Rails.logger.warn "#{e.class} #{e.message}: #{e.backtrace.join("\n")}"
|
||||
unless e.is_a?(Redis::CannotConnectError)
|
||||
Rails.logger.warn "#{e.class} #{e.message}: #{e.backtrace.join("\n")}"
|
||||
end
|
||||
|
||||
false
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user