Commit 60f21ff9 authored by Oswaldo Ferreira's avatar Oswaldo Ferreira

Eagerload queues yaml file

parent e2fe8d38
...@@ -5,7 +5,10 @@ module Gitlab ...@@ -5,7 +5,10 @@ module Gitlab
def self.queues(rails_path = Rails.root.to_s, except: []) def self.queues(rails_path = Rails.root.to_s, except: [])
queues_file_path = File.join(rails_path, 'config', 'sidekiq_queues.yml') queues_file_path = File.join(rails_path, 'config', 'sidekiq_queues.yml')
YAML.load_file(queues_file_path).fetch(:queues).map { |queue, _| queue } - except @queues_file = {}
@queues_file[queues_file_path] ||= YAML.load_file(queues_file_path)
@queues_file[queues_file_path].fetch(:queues).map { |queue, _| queue } - except
end end
end end
end end
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