Skip to content

Commit

Permalink
DEV: Avoid logging errors on bad Redis connection during PG failover.
Browse files Browse the repository at this point in the history
  • Loading branch information
tgxworld committed Jun 29, 2020
1 parent 89bac20 commit 2c4c953
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion config/initializers/002-rails_failover.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@
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

0 comments on commit 2c4c953

Please sign in to comment.