Class: ActiveJob::QueueAdapters::SneakersAdapter
Relationships & Source Files | |
Namespace Children | |
Classes:
| |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
AbstractAdapter
|
|
Instance Chain:
self,
AbstractAdapter
|
|
Inherits: |
ActiveJob::QueueAdapters::AbstractAdapter
|
Defined in: | activejob/lib/active_job/queue_adapters/sneakers_adapter.rb |
Overview
Sneakers adapter for Active Job
A high-performance RabbitMQ background processing framework for Ruby. Sneakers is being used in production for both I/O and CPU intensive workloads, and have achieved the goals of high-performance and 0-maintenance, as designed.
Read more about Sneakers here.
To use Sneakers set the queue_adapter config to :sneakers
.
Rails.application.config.active_job.queue_adapter = :sneakers
Class Method Summary
- .new ⇒ SneakersAdapter constructor
Instance Method Summary
- #enqueue(job) Internal use only
- #enqueue_at(job, timestamp) Internal use only
AbstractAdapter
- Inherited
Constructor Details
.new ⇒ SneakersAdapter
# File 'activejob/lib/active_job/queue_adapters/sneakers_adapter.rb', line 21
def initialize @monitor = Monitor.new end
Instance Method Details
#enqueue(job)
This method is for internal use only.
[ GitHub ]
# File 'activejob/lib/active_job/queue_adapters/sneakers_adapter.rb', line 25
def enqueue(job) # :nodoc: @monitor.synchronize do JobWrapper.from_queue job.queue_name JobWrapper.enqueue ActiveSupport::JSON.encode(job.serialize) end end
#enqueue_at(job, timestamp)
This method is for internal use only.
# File 'activejob/lib/active_job/queue_adapters/sneakers_adapter.rb', line 32
def enqueue_at(job, ) # :nodoc: raise NotImplementedError, "This queueing backend does not support scheduling jobs. To see what features are supported go to http://api.rubyonrails.org/classes/ActiveJob/QueueAdapters.html" end