gitlab-org--gitlab-foss/app/workers/concerns/dedicated_sidekiq_queue.rb

10 lines
258 B
Ruby
Raw Normal View History

# Concern that sets the queue of a Sidekiq worker based on the worker's class
# name/namespace.
module DedicatedSidekiqQueue
extend ActiveSupport::Concern
included do
sidekiq_options queue: name.sub(/Worker\z/, '').underscore.tr('/', '_')
end
end