mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 09:42:07 +08:00
DEV: Fix undefined method.
This commit is contained in:
parent
f38438c6de
commit
e0d798c06c
|
@ -43,11 +43,11 @@ if ENV['SKIP_DB_AND_REDIS'] == '1'
|
||||||
GlobalSetting.skip_redis = true
|
GlobalSetting.skip_redis = true
|
||||||
end
|
end
|
||||||
|
|
||||||
if !GlobalSetting.skip_db
|
if !GlobalSetting.skip_db?
|
||||||
require 'rails_failover/active_record'
|
require 'rails_failover/active_record'
|
||||||
end
|
end
|
||||||
|
|
||||||
if !GlobalSetting.skip_redis
|
if !GlobalSetting.skip_redis?
|
||||||
require 'rails_failover/redis'
|
require 'rails_failover/redis'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
if !GlobalSetting.skip_redis
|
if !GlobalSetting.skip_redis?
|
||||||
message_bus_keepalive_interval = nil
|
message_bus_keepalive_interval = nil
|
||||||
|
|
||||||
RailsFailover::Redis.on_failover do
|
RailsFailover::Redis.on_failover do
|
||||||
|
@ -16,7 +16,7 @@ if !GlobalSetting.skip_redis
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if !GlobalSetting.skip_db
|
if !GlobalSetting.skip_db?
|
||||||
if Rails.configuration.multisite
|
if Rails.configuration.multisite
|
||||||
if ActiveRecord::Base.current_role == ActiveRecord::Base.reading_role
|
if ActiveRecord::Base.current_role == ActiveRecord::Base.reading_role
|
||||||
RailsMultisite::ConnectionManagement.default_connection_handler =
|
RailsMultisite::ConnectionManagement.default_connection_handler =
|
||||||
|
|
Loading…
Reference in New Issue
Block a user