123456789_123456789_123456789_123456789_123456789_

Module: ActiveJob::QueuePriority

Relationships & Source Files
Namespace Children
Modules:
Extension / Inclusion / Inheritance Descendants
Included In:
ActionMailer::MailDeliveryJob, Base, ::ActiveRecord::DestroyAssociationAsyncJob
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Defined in: activejob/lib/active_job/queue_priority.rb

Class Method Summary

::ActiveSupport::Concern - Extended

class_methods

Define class methods from given block.

included

Evaluate given block in context of base class, so that you can write class macros here.

prepended

Evaluate given block in context of base class, so that you can write class macros here.

Instance Method Summary

  • #priority

    Returns the priority that the job will be created with.

DSL Calls

included

[ GitHub ]


48
49
50
# File 'activejob/lib/active_job/queue_priority.rb', line 48

included do
  class_attribute :priority, instance_accessor: false, default: default_priority
end

Instance Method Details

#priority

Returns the priority that the job will be created with

[ GitHub ]

  
# File 'activejob/lib/active_job/queue_priority.rb', line 53

def priority
  if @priority.is_a?(Proc)
    @priority = instance_exec(&@priority)
  end
  @priority
end