123456789_123456789_123456789_123456789_123456789_

Module: ActiveJob::QueueName

Relationships & Source Files
Namespace Children
Modules:
Extension / Inclusion / Inheritance Descendants
Included In:
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Defined in: activejob/lib/active_job/queue_name.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.

append_features, prepend_features

Instance Method Summary

  • #queue_name

    Returns the name of the queue the job will be run on.

DSL Calls

included

[ GitHub ]


54
55
56
57
58
# File 'activejob/lib/active_job/queue_name.rb', line 54

included do
  class_attribute :queue_name, instance_accessor: false, default: -> { self.class.default_queue_name }
  class_attribute :queue_name_delimiter, instance_accessor: false, default: "_"
  class_attribute :queue_name_prefix
end

Instance Method Details

#queue_name

Returns the name of the queue the job will be run on.

[ GitHub ]

  
# File 'activejob/lib/active_job/queue_name.rb', line 61

def queue_name
  if @queue_name.is_a?(Proc)
    @queue_name = self.class.queue_name_from_part(instance_exec(&@queue_name))
  end
  @queue_name
end