Includes the setter method for changing the active queue adapter.
Methods
Constants
QUEUE_ADAPTER_METHODS | = | [:enqueue, :enqueue_at].freeze |
Instance Public methods
queue_adapter() Link
Returns the backend queue provider. The default queue adapter is :async
. See QueueAdapters
for more information.
queue_adapter=(name_or_adapter) Link
Specify the backend queue provider. The default queue adapter is the :async
queue. See QueueAdapters
for more information.
# File activejob/lib/active_job/queue_adapter.rb, line 49 def queue_adapter=(name_or_adapter) case name_or_adapter when Symbol, String queue_adapter = ActiveJob::QueueAdapters.lookup(name_or_adapter).new queue_adapter.try(:check_adapter) assign_adapter(name_or_adapter.to_s, queue_adapter) else if queue_adapter?(name_or_adapter) adapter_name = ActiveJob.adapter_name(name_or_adapter).underscore assign_adapter(adapter_name, name_or_adapter) else raise ArgumentError end end end
queue_adapter_name() Link
Returns string denoting the name of the configured queue adapter. By default returns "async"
.