From e7bbd85b3424ec64cb7f56452fd7f5ee48663a60 Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Tue, 24 Mar 2015 13:16:11 +0100 Subject: [PATCH] Limit number of concurrent archive_repo jobs to 2. --- Gemfile | 1 + Gemfile.lock | 3 +++ config/initializers/4_sidekiq.rb | 2 ++ 3 files changed, 6 insertions(+) diff --git a/Gemfile b/Gemfile index e767aec5053..0dd285d0fdd 100644 --- a/Gemfile +++ b/Gemfile @@ -122,6 +122,7 @@ gem 'slim' gem 'sinatra', require: nil gem 'sidekiq', '~> 3.3' gem 'sidetiq', '0.6.3' +gem 'sidekiq-limit_fetch' # HTTP requests gem "httparty" diff --git a/Gemfile.lock b/Gemfile.lock index ed8663b358b..c6ecdb4db0a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -547,6 +547,8 @@ GEM json redis (>= 3.0.6) redis-namespace (>= 1.3.1) + sidekiq-limit_fetch (2.4.1) + sidekiq (>= 2.6.5, < 4.0) sidetiq (0.6.3) celluloid (>= 0.14.1) ice_cube (= 0.11.1) @@ -769,6 +771,7 @@ DEPENDENCIES settingslogic shoulda-matchers (~> 2.7.0) sidekiq (~> 3.3) + sidekiq-limit_fetch sidetiq (= 0.6.3) simplecov sinatra diff --git a/config/initializers/4_sidekiq.rb b/config/initializers/4_sidekiq.rb index e856499732e..da2e8a08b07 100644 --- a/config/initializers/4_sidekiq.rb +++ b/config/initializers/4_sidekiq.rb @@ -25,3 +25,5 @@ Sidekiq.configure_client do |config| namespace: 'resque:gitlab' } end + +Sidekiq::Queue["archive_repo"].limit = 2