DEV: Don't configure rails_failover is db and redis is skipped take 2

This commit is contained in:
Guo Xiang Tan 2020-06-15 16:02:30 +08:00
parent e0fdf41537
commit f38438c6de
No known key found for this signature in database
GPG Key ID: FBD110179AAC1F20
1 changed files with 8 additions and 8 deletions

View File

@ -20,14 +20,6 @@ require 'action_view/railtie'
require 'action_mailer/railtie'
require 'sprockets/railtie'
if !GlobalSetting.skip_db
require 'rails_failover/active_record'
end
if !GlobalSetting.skip_redis
require 'rails_failover/redis'
end
# Plugin related stuff
require_relative '../lib/plugin_initialization_guard'
require_relative '../lib/discourse_event'
@ -51,6 +43,14 @@ if ENV['SKIP_DB_AND_REDIS'] == '1'
GlobalSetting.skip_redis = true
end
if !GlobalSetting.skip_db
require 'rails_failover/active_record'
end
if !GlobalSetting.skip_redis
require 'rails_failover/redis'
end
require 'pry-rails' if Rails.env.development?
if defined?(Bundler)