module ActiveJob::QueueName::ClassMethods

def queue_as(part_name = nil, &block)

end
end
post.to_feed!
def perform(post)

end
end
:feeds
else
:paid_feeds
if post.paid?

post = self.arguments.first
queue_as do
class PublishToFeedJob < ApplicationJob

so that a dynamic queue name can be applied:
Can be given a block that will evaluate in the context of the job

end
end
post.to_feed!
def perform(post)

queue_as :feeds
class PublishToFeedJob < ActiveJob::Base

Specifies the name of the queue to process the job on.
def queue_as(part_name = nil, &block)
  if block_given?
    self.queue_name = block
  else
    self.queue_name = queue_name_from_part(part_name)
  end
end

def queue_name_from_part(part_name) # :nodoc:

:nodoc:
def queue_name_from_part(part_name) # :nodoc:
  queue_name = part_name || default_queue_name
  name_parts = [queue_name_prefix.presence, queue_name]
  -name_parts.compact.join(queue_name_delimiter)
end