Commit 68106608 authored by Sean McGivern's avatar Sean McGivern

Tidy up SidekiqConfig::CliMethods#worker_queues

This doesn't need to support an array of strings any more; it was always
a very cautious approach.
parent d1618331
......@@ -48,7 +48,6 @@ module Gitlab
# rubocop:enable Gitlab/ModuleWithInstanceVariables
def worker_queues(rails_path = Rails.root.to_s)
# https://gitlab.com/gitlab-org/gitlab/issues/199230
worker_names(all_queues(rails_path))
end
......@@ -75,7 +74,7 @@ module Gitlab
private
def worker_names(workers)
workers.map { |queue| queue.is_a?(Hash) ? queue[:name] : queue }
workers.map { |queue| queue[:name] }
end
def query_string_to_lambda(query_string)
......
......@@ -54,14 +54,6 @@ describe Gitlab::SidekiqConfig::CliMethods do
end
end
context 'when the file contains an array of strings' do
before do
stub_contents(['queue_a'], ['queue_b'])
end
include_examples 'valid file contents'
end
context 'when the file contains an array of hashes' do
before do
stub_contents([{ name: 'queue_a' }], [{ name: 'queue_b' }])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment