FIX: Force ActiveRecord reading role if Redis is down.

This commit is contained in:
Guo Xiang Tan 2020-07-09 11:13:02 +08:00
parent cbe1dd8ec7
commit f03c7a1ba1
No known key found for this signature in database
GPG Key ID: FBD110179AAC1F20
1 changed files with 3 additions and 2 deletions

View File

@ -57,8 +57,9 @@ if defined?(RailsFailover::ActiveRecord)
rescue => e
unless e.is_a?(Redis::CannotConnectError)
Rails.logger.warn "#{e.class} #{e.message}: #{e.backtrace.join("\n")}"
true
else
false
end
false
end
end