Limit number of concurrent archive_repo jobs to 2.

This commit is contained in:
Douwe Maan 2015-03-24 13:16:11 +01:00
parent 2cfd0b59ae
commit e7bbd85b34
3 changed files with 6 additions and 0 deletions

View file

@ -122,6 +122,7 @@ gem 'slim'
gem 'sinatra', require: nil gem 'sinatra', require: nil
gem 'sidekiq', '~> 3.3' gem 'sidekiq', '~> 3.3'
gem 'sidetiq', '0.6.3' gem 'sidetiq', '0.6.3'
gem 'sidekiq-limit_fetch'
# HTTP requests # HTTP requests
gem "httparty" gem "httparty"

View file

@ -547,6 +547,8 @@ GEM
json json
redis (>= 3.0.6) redis (>= 3.0.6)
redis-namespace (>= 1.3.1) redis-namespace (>= 1.3.1)
sidekiq-limit_fetch (2.4.1)
sidekiq (>= 2.6.5, < 4.0)
sidetiq (0.6.3) sidetiq (0.6.3)
celluloid (>= 0.14.1) celluloid (>= 0.14.1)
ice_cube (= 0.11.1) ice_cube (= 0.11.1)
@ -769,6 +771,7 @@ DEPENDENCIES
settingslogic settingslogic
shoulda-matchers (~> 2.7.0) shoulda-matchers (~> 2.7.0)
sidekiq (~> 3.3) sidekiq (~> 3.3)
sidekiq-limit_fetch
sidetiq (= 0.6.3) sidetiq (= 0.6.3)
simplecov simplecov
sinatra sinatra

View file

@ -25,3 +25,5 @@ Sidekiq.configure_client do |config|
namespace: 'resque:gitlab' namespace: 'resque:gitlab'
} }
end end
Sidekiq::Queue["archive_repo"].limit = 2