diff --git a/config/application.rb b/config/application.rb index a7e6df5214a..6120831f6dd 100644 --- a/config/application.rb +++ b/config/application.rb @@ -43,11 +43,11 @@ if ENV['SKIP_DB_AND_REDIS'] == '1' GlobalSetting.skip_redis = true end -if !GlobalSetting.skip_db +if !GlobalSetting.skip_db? require 'rails_failover/active_record' end -if !GlobalSetting.skip_redis +if !GlobalSetting.skip_redis? require 'rails_failover/redis' end diff --git a/config/initializers/002-rails_failover.rb b/config/initializers/002-rails_failover.rb index d60c1c13077..88261085256 100644 --- a/config/initializers/002-rails_failover.rb +++ b/config/initializers/002-rails_failover.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -if !GlobalSetting.skip_redis +if !GlobalSetting.skip_redis? message_bus_keepalive_interval = nil RailsFailover::Redis.on_failover do @@ -16,7 +16,7 @@ if !GlobalSetting.skip_redis end end -if !GlobalSetting.skip_db +if !GlobalSetting.skip_db? if Rails.configuration.multisite if ActiveRecord::Base.current_role == ActiveRecord::Base.reading_role RailsMultisite::ConnectionManagement.default_connection_handler =