diff options
author | Patricio Cano <suprnova32@gmail.com> | 2016-11-09 01:31:37 +0300 |
---|---|---|
committer | Patricio Cano <suprnova32@gmail.com> | 2016-11-10 20:38:11 +0300 |
commit | 208530494e5d2c5c62a3e1c24489aae0e4935e3a (patch) | |
tree | 5e4d76a6380566ab771b58c5017fba23ff321ace /config | |
parent | 1d3ada80ad6cb9a4927512fdf4018907bf3098a6 (diff) |
Refactored initializer code to its own class and added tests
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/sidekiq.rb | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/config/initializers/sidekiq.rb b/config/initializers/sidekiq.rb index 7cc5e396f98..b87b31d9697 100644 --- a/config/initializers/sidekiq.rb +++ b/config/initializers/sidekiq.rb @@ -29,13 +29,7 @@ Sidekiq.configure_server do |config| end Sidekiq::Cron::Job.load_from_hash! cron_jobs - if Gitlab::CurrentSettings.sidekiq_throttling_enabled? - factor = current_application_settings.sidekiq_throttling_factor - - current_application_settings.sidekiq_throttling_queues.each do |queue| - Sidekiq::Queue[queue].limit = (factor * Sidekiq.options[:concurrency]).ceil - end - end + Gitlab::SidekiqThrottler.execute! # Database pool should be at least `sidekiq_concurrency` + 2 # For more info, see: https://github.com/mperham/sidekiq/blob/master/4.0-Upgrade.md |