Class: ActiveJob::QueueAdapters::SneakersAdapter

Inherits:
Object
  • Object
show all
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

Defined Under Namespace

Classes: JobWrapper

Class Method Summary collapse

Class Method Details

.enqueue(job) ⇒ Object

:nodoc:


22
23
24
25
26
27
# File 'activejob/lib/active_job/queue_adapters/sneakers_adapter.rb', line 22

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) ⇒ Object

:nodoc:

Raises:

  • (NotImplementedError)

29
30
31
# File 'activejob/lib/active_job/queue_adapters/sneakers_adapter.rb', line 29

def enqueue_at(job, timestamp) #:nodoc:
  raise NotImplementedError
end