mirror of
https://github.com/discourse/discourse.git
synced 2025-01-31 22:04:00 +08:00
FIX: Force ActiveRecord reading role if Redis is down.
This commit is contained in:
parent
cbe1dd8ec7
commit
f03c7a1ba1
|
@ -57,8 +57,9 @@ if defined?(RailsFailover::ActiveRecord)
|
||||||
rescue => e
|
rescue => e
|
||||||
unless e.is_a?(Redis::CannotConnectError)
|
unless e.is_a?(Redis::CannotConnectError)
|
||||||
Rails.logger.warn "#{e.class} #{e.message}: #{e.backtrace.join("\n")}"
|
Rails.logger.warn "#{e.class} #{e.message}: #{e.backtrace.join("\n")}"
|
||||||
end
|
true
|
||||||
|
else
|
||||||
false
|
false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user