module ActiveJob::QueueAdapter::ClassMethods

Includes the setter method for changing the active queue adapter.

Public Instance Methods

queue_adapter=(name_or_adapter) Show source
# File activejob/lib/active_job/queue_adapter.rb, line 17
def queue_adapter=(name_or_adapter)
  @@queue_adapter =            case name_or_adapter
    when :test
      ActiveJob::QueueAdapters::TestAdapter.new
    when Symbol, String
      load_adapter(name_or_adapter)
    else
      name_or_adapter if name_or_adapter.respond_to?(:enqueue)
    end
end

Specify the backend queue provider. The default queue adapter is the :inline queue. See QueueAdapters for more information.

© 2004–2018 David Heinemeier Hansson
Licensed under the MIT License.