module ActiveJob::QueuePriority::ClassMethods

def queue_with_priority(priority = nil, &block)

end
end
post.to_feed!
def perform(post)

end
end
50
else
10
if post.paid?

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

so that a dynamic priority 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_with_priority 50
class PublishToFeedJob < ActiveJob::Base

Specifies the priority of the queue to create the job with.
def queue_with_priority(priority = nil, &block)
  if block_given?
    self.priority = block
  else
    self.priority = priority
  end
end