mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 01:42:04 +08:00
DEV: Bump rails_failover.
Avoid configuring AR stuff if `replica_host` and `replica_port` hasn't been provided.
This commit is contained in:
parent
a2713578dd
commit
092ae858af
|
@ -280,7 +280,7 @@ GEM
|
|||
nokogiri (>= 1.6)
|
||||
rails-html-sanitizer (1.3.0)
|
||||
loofah (~> 2.3)
|
||||
rails_failover (0.5.0)
|
||||
rails_failover (0.5.1)
|
||||
activerecord (~> 6.0)
|
||||
railties (~> 6.0)
|
||||
rails_multisite (2.3.0)
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
return unless Rails.configuration.active_record_rails_failover
|
||||
|
||||
if defined?(RailsFailover::Redis)
|
||||
message_bus_keepalive_interval = nil
|
||||
|
||||
|
|
|
@ -25,9 +25,9 @@ if Rails.configuration.multisite
|
|||
Rails.configuration.middleware.unshift RailsMultisite::Middleware, RailsMultisite::DiscoursePatches.config
|
||||
Rails.configuration.middleware.delete ActionDispatch::Executor
|
||||
|
||||
if defined?(RailsFailover)
|
||||
if defined?(RailsFailover) && Rails.configuration.active_record_rails_failover
|
||||
Rails.configuration.middleware.insert_after(RailsMultisite::Middleware, RailsFailover::ActiveRecord::Middleware)
|
||||
end
|
||||
elsif defined?(RailsFailover)
|
||||
elsif defined?(RailsFailover) && Rails.configuration.active_record_rails_failover
|
||||
Rails.configuration.middleware.insert_before(MessageBus::Rack::Middleware, RailsFailover::ActiveRecord::Middleware)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user