module ActiveJob::QueueAdapter::ClassMethods
def assign_adapter(adapter_name, queue_adapter)
def assign_adapter(adapter_name, queue_adapter) self._queue_adapter_name = adapter_name self._queue_adapter = queue_adapter end
def queue_adapter
Returns the backend queue provider. The default queue adapter
def queue_adapter _queue_adapter end
def queue_adapter=(name_or_adapter)
is the +:async+ queue. See QueueAdapters for more
Specify the backend queue provider. The default queue adapter
def queue_adapter=(name_or_adapter) case name_or_adapter when Symbol, String queue_adapter = ActiveJob::QueueAdapters.lookup(name_or_adapter).new assign_adapter(name_or_adapter.to_s, queue_adapter) else if queue_adapter?(name_or_adapter) adapter_name = "#{name_or_adapter.class.name.demodulize.remove('Adapter').underscore}" assign_adapter(adapter_name, name_or_adapter) else raise ArgumentError end end end
def queue_adapter?(object)
def queue_adapter?(object) QUEUE_ADAPTER_METHODS.all? { |meth| object.respond_to?(meth) } end
def queue_adapter_name
Returns string denoting the name of the configured queue adapter.
def queue_adapter_name _queue_adapter_name end