diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2017-03-17 14:16:47 +0100 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2017-03-17 17:08:10 +0100 |
commit | 9a20ff1c99e0e73883d32438e50772635f0aed27 (patch) | |
tree | c99d875ffeba6bbb587d8c9e388d29036e040c97 /config | |
parent | 7a623907528a77187e070c9721469df8bdd00ec8 (diff) | |
download | gitlab-ce-9a20ff1c99e0e73883d32438e50772635f0aed27.tar.gz |
Added Gitlab::Database.config
This returns the ActiveRecord configuration for the current environment.
While CE doesn't use this very often, EE will use it in a few places for
the database load balancing code. I'm adding this to CE so we don't end
up with merge conflicts in this file.
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/sidekiq.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/config/initializers/sidekiq.rb b/config/initializers/sidekiq.rb index 2b018c68703..ecd73956488 100644 --- a/config/initializers/sidekiq.rb +++ b/config/initializers/sidekiq.rb @@ -42,7 +42,7 @@ Sidekiq.configure_server do |config| Gitlab::SidekiqThrottler.execute! - config = ActiveRecord::Base.configurations[Rails.env] || + config = Gitlab::Database.config || Rails.application.config.database_configuration[Rails.env] config['pool'] = Sidekiq.options[:concurrency] ActiveRecord::Base.establish_connection(config) |