diff options
author | Valery Sizov <valery@gitlab.com> | 2018-09-14 17:27:31 +0300 |
---|---|---|
committer | Valery Sizov <valery@gitlab.com> | 2018-09-24 18:41:14 +0300 |
commit | 2daa8d387bd4dd87f872d0f195d25e67cd199777 (patch) | |
tree | de4a8d3bbdd4f337957aba9555a67e34d2fb5f2a /lib | |
parent | 4007456808a9d18858b2c117b9cc6fee91d26ed6 (diff) | |
download | gitlab-ce-2daa8d387bd4dd87f872d0f195d25e67cd199777.tar.gz |
Remove background job throttling feature51509-remove-sidekiq-limit-fetch
We remove this feature as it never worked properly
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/settings.rb | 5 | ||||
-rw-r--r-- | lib/gitlab/sidekiq_throttler.rb | 25 |
2 files changed, 0 insertions, 30 deletions
diff --git a/lib/api/settings.rb b/lib/api/settings.rb index c80d9890706..8d71bd9dff1 100644 --- a/lib/api/settings.rb +++ b/lib/api/settings.rb @@ -117,11 +117,6 @@ module API given shared_runners_enabled: ->(val) { val } do requires :shared_runners_text, type: String, desc: 'Shared runners text ' end - optional :sidekiq_throttling_enabled, type: Boolean, desc: 'Enable Sidekiq Job Throttling' - given sidekiq_throttling_enabled: ->(val) { val } do - requires :sidekiq_throttling_factor, type: Float, desc: 'The factor by which the queues should be throttled. A value between 0.0 and 1.0, exclusive.' - requires :sidekiq_throttling_queues, type: Array[String], desc: 'Choose which queues you wish to throttle' - end optional :sign_in_text, type: String, desc: 'The sign in text of the GitLab application' optional :signin_enabled, type: Boolean, desc: 'Flag indicating if password authentication is enabled for the web interface' # support legacy names, can be removed in v5 optional :signup_enabled, type: Boolean, desc: 'Flag indicating if sign up is enabled' diff --git a/lib/gitlab/sidekiq_throttler.rb b/lib/gitlab/sidekiq_throttler.rb deleted file mode 100644 index 5512afa45a8..00000000000 --- a/lib/gitlab/sidekiq_throttler.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Gitlab - class SidekiqThrottler - class << self - def execute! - if Gitlab::CurrentSettings.sidekiq_throttling_enabled? - require 'sidekiq-limit_fetch' - - Gitlab::CurrentSettings.current_application_settings.sidekiq_throttling_queues.each do |queue| - Sidekiq::Queue[queue].limit = queue_limit - end - end - end - - private - - def queue_limit - @queue_limit ||= - begin - factor = Gitlab::CurrentSettings.current_application_settings.sidekiq_throttling_factor - (factor * Sidekiq.options[:concurrency]).ceil - end - end - end - end -end |