Class: ActiveJob::QueueAdapters::PikaQueRails4

Inherits:
Object
  • Object
show all
Defined in:
lib/active_job/queue_adapters/pika_que_adapter.rb

Overview

PikaQue adapter for Active Job

PikaQue is a RabbitMQ background processing framework for Ruby.

Read more about PikaQue here.

To use PikaQue set the queue_adapter config to :pika_que.

Rails.application.config.active_job.queue_adapter = :pika_que

Class Method Summary collapse

Class Method Details

.enqueue(job) ⇒ Object

:nodoc:



20
21
22
23
24
# File 'lib/active_job/queue_adapters/pika_que_adapter.rb', line 20

def enqueue(job) #:nodoc:
  @monitor.synchronize do
    PikaQue::RailsWorker.enqueue job.serialize, to_queue: job.queue_name
  end
end

.enqueue_at(job, timestamp) ⇒ Object

:nodoc:



26
27
28
29
30
# File 'lib/active_job/queue_adapters/pika_que_adapter.rb', line 26

def enqueue_at(job, timestamp) #:nodoc:
  @monitor.synchronize do
    PikaQue::RailsWorker.enqueue_at job.serialize, timestamp, routing_key: job.queue_name
  end
end