Skip to content
Snippets Groups Projects
Commit e120063d authored by DJ Mountney's avatar DJ Mountney
Browse files

Merge branch 'support-min-concurrency-for-sidekiq-cluster' into 'master'

Support the --min-concurrency option for sidekiq-cluster

See merge request gitlab-org/omnibus-gitlab!3867
parents 47169aaf 1cc2c105
No related branches found
No related tags found
No related merge requests found
---
title: Support min_concurrency option for sidekiq-cluster
merge_request: 3867
author:
type: added
Loading
Loading
@@ -2023,6 +2023,7 @@ external_url 'GENERATED_EXTERNAL_URL'
# sidekiq_cluster['log_directory'] = "/var/log/gitlab/sidekiq-cluster"
# sidekiq_cluster['interval'] = 5 # The number of seconds to wait between worker checks
# sidekiq_cluster['max_concurrency'] = 50 # The maximum number of threads each Sidekiq process should run
# sidekiq_cluster['min_concurrency'] = 0 # The minimum number of threads each Sidekiq process should run
 
##! Each entry in the queue_groups array denotes a group of queues that have to be processed by a
##! Sidekiq process. Multiple queues can be processed by the same process by
Loading
Loading
Loading
Loading
@@ -36,6 +36,7 @@ default['gitlab']['sidekiq-cluster']['ha'] = false
default['gitlab']['sidekiq-cluster']['log_directory'] = "/var/log/gitlab/sidekiq-cluster"
default['gitlab']['sidekiq-cluster']['interval'] = nil
default['gitlab']['sidekiq-cluster']['max_concurrency'] = nil
default['gitlab']['sidekiq-cluster']['min_concurrency'] = nil
default['gitlab']['sidekiq-cluster']['queue_groups'] = []
default['gitlab']['sidekiq-cluster']['negate'] = false
 
Loading
Loading
Loading
Loading
@@ -19,6 +19,9 @@ exec chpst -e /opt/gitlab/etc/gitlab-rails/env -P \
<% if node['gitlab']['sidekiq-cluster']['max_concurrency'] %>
-m <%= node['gitlab']['sidekiq-cluster']['max_concurrency'] %> \
<% end %>
<% if node['gitlab']['sidekiq-cluster']['min_concurrency'] %>
--min-concurrency <%= node['gitlab']['sidekiq-cluster']['min_concurrency'] %> \
<% end %>
<% node['gitlab']['sidekiq-cluster']['queue_groups'].each do |queue| %>
<%= queue %> \
<% end %>
Loading
Loading
Loading
Loading
@@ -122,6 +122,23 @@ describe 'gitlab-ee::sidekiq-cluster' do
end
end
 
context 'with min_concurrency set' do
before do
stub_gitlab_rb(sidekiq_cluster: {
enable: true,
min_concurrency: 50,
queue_groups: ['process_commit,post_receive', 'gitlab_shell']
})
end
it 'correctly renders out the sidekiq-cluster service file' do
expect(chef_run).to render_file("/opt/gitlab/sv/sidekiq-cluster/run")
.with_content { |content|
expect(content).to match(/--min-concurrency 50/)
}
end
end
describe 'when specifying sidekiq.log_format' do
before do
stub_gitlab_rb(
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment