module ActiveJob::QueuePriority

def priority

Returns the priority that the job will be created with
def priority
  if @priority.is_a?(Proc)
    @priority = instance_exec(&@priority)
  end
  @priority
end