Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-21 00:09:17 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-21 00:09:17 +0300
commit68f1860e6f1f9e8441c434f4e62238c359ce8c7c (patch)
treed12eab92b88fdcd0bdcea4586ec5352898b16e6c /lib/gitlab/sidekiq_cluster.rb
parent1af0d38d9c5a88d7123283c714857dc4da991371 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/sidekiq_cluster.rb')
-rw-r--r--lib/gitlab/sidekiq_cluster.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/gitlab/sidekiq_cluster.rb b/lib/gitlab/sidekiq_cluster.rb
index c19bef1389a..70df40fc35d 100644
--- a/lib/gitlab/sidekiq_cluster.rb
+++ b/lib/gitlab/sidekiq_cluster.rb
@@ -1,5 +1,7 @@
# frozen_string_literal: true
+require 'shellwords'
+
module Gitlab
module SidekiqCluster
# The signals that should terminate both the master and workers.
@@ -73,9 +75,9 @@ module Gitlab
counts = count_by_queue(queues)
cmd = %w[bundle exec sidekiq]
- cmd << "-c #{self.concurrency(queues, min_concurrency, max_concurrency)}"
+ cmd << "-c#{self.concurrency(queues, min_concurrency, max_concurrency)}"
cmd << "-e#{env}"
- cmd << "-gqueues: #{proc_details(counts)}"
+ cmd << "-gqueues:#{proc_details(counts)}"
cmd << "-r#{directory}"
counts.each do |queue, count|
@@ -83,7 +85,7 @@ module Gitlab
end
if dryrun
- puts "Sidekiq command: #{cmd}" # rubocop:disable Rails/Output
+ puts Shellwords.join(cmd) # rubocop:disable Rails/Output
return
end
@@ -112,7 +114,7 @@ module Gitlab
else
"#{queue} (#{count})"
end
- end.join(', ')
+ end.join(',')
end
def self.concurrency(queues, min_concurrency, max_concurrency)