Module: ActiveJob::QueueName::ClassMethods
Relationships & Source Files | |
Defined in: | activejob/lib/active_job/queue_name.rb |
Overview
Includes the ability to override the default queue name and prefix.
Class Attribute Summary
- .default_queue_name (also: #default_queue_name) rw
- .queue_name_prefix (also: #queue_name_prefix) rw
Instance Attribute Summary
Instance Method Summary
-
#queue_as(part_name = nil, &block)
Specifies the name of the queue to process the job on.
Class Attribute Details
.default_queue_name (rw) Also known as: #default_queue_name
[ GitHub ]# File 'activejob/lib/active_job/queue_name.rb', line 10
mattr_accessor :default_queue_name, default: "default"
.queue_name_prefix (rw) Also known as: #queue_name_prefix
[ GitHub ]# File 'activejob/lib/active_job/queue_name.rb', line 9
mattr_accessor :queue_name_prefix
Instance Attribute Details
#default_queue_name (rw)
[ GitHub ]# File 'activejob/lib/active_job/queue_name.rb', line 10
mattr_accessor :default_queue_name, default: "default"
#queue_name_prefix (rw)
[ GitHub ]# File 'activejob/lib/active_job/queue_name.rb', line 9
mattr_accessor :queue_name_prefix
Instance Method Details
#queue_as(part_name = nil, &block)
# File 'activejob/lib/active_job/queue_name.rb', line 21
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