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>2022-05-19 10:33:21 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-05-19 10:33:21 +0300
commit36a59d088eca61b834191dacea009677a96c052f (patch)
treee4f33972dab5d8ef79e3944a9f403035fceea43f /lib/gitlab/sidekiq_config.rb
parenta1761f15ec2cae7c7f7bbda39a75494add0dfd6f (diff)
Add latest changes from gitlab-org/gitlab@15-0-stable-eev15.0.0-rc42
Diffstat (limited to 'lib/gitlab/sidekiq_config.rb')
-rw-r--r--lib/gitlab/sidekiq_config.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/gitlab/sidekiq_config.rb b/lib/gitlab/sidekiq_config.rb
index 3eef41a2ca2..ac9a7d25fc2 100644
--- a/lib/gitlab/sidekiq_config.rb
+++ b/lib/gitlab/sidekiq_config.rb
@@ -141,6 +141,20 @@ module Gitlab
.to_h
end
+ # Get the list of queues from all available workers following queue
+ # routing rules. Sidekiq::Queue.all fetches the list of queues from Redis.
+ # It may contain some redundant, obsolete queues from previous iterations
+ # of GitLab.
+ def routing_queues
+ @routing_queues ||= workers.map do |worker|
+ if worker.klass.is_a?(Gitlab::SidekiqConfig::DummyWorker)
+ worker.queue
+ else
+ ::Gitlab::SidekiqConfig::WorkerRouter.global.route(worker.klass)
+ end
+ end.uniq.sort
+ end
+
private
def find_workers(root, ee:, jh:)