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:
Diffstat (limited to 'sidekiq_cluster/sidekiq_cluster.rb')
-rw-r--r--sidekiq_cluster/sidekiq_cluster.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/sidekiq_cluster/sidekiq_cluster.rb b/sidekiq_cluster/sidekiq_cluster.rb
index c68cbe7c163..1ed08e7e839 100644
--- a/sidekiq_cluster/sidekiq_cluster.rb
+++ b/sidekiq_cluster/sidekiq_cluster.rb
@@ -1,6 +1,7 @@
# frozen_string_literal: true
require_relative '../lib/gitlab/process_management'
+require_relative '../lib/gitlab/process_supervisor'
module Gitlab
module SidekiqCluster
@@ -33,8 +34,9 @@ module Gitlab
#
# directory - The directory of the Rails application.
#
- # Returns an Array containing the PIDs of the started processes.
- def self.start(queues, env: :development, directory: Dir.pwd, max_concurrency: 50, min_concurrency: 0, timeout: DEFAULT_SOFT_TIMEOUT_SECONDS, dryrun: false)
+ # Returns an Array containing the waiter threads (from Process.detach) of
+ # the started processes.
+ def self.start(queues, env: :development, directory: Dir.pwd, max_concurrency: 20, min_concurrency: 0, timeout: DEFAULT_SOFT_TIMEOUT_SECONDS, dryrun: false)
queues.map.with_index do |pair, index|
start_sidekiq(pair, env: env,
directory: directory,
@@ -82,9 +84,7 @@ module Gitlab
)
end
- ProcessManagement.wait_async(pid)
-
- pid
+ Process.detach(pid)
end
def self.count_by_queue(queues)