Class: ActiveJob::QueueAdapters::PikaQueRails4
- Inherits:
-
Object
- Object
- ActiveJob::QueueAdapters::PikaQueRails4
- 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
-
.enqueue(job) ⇒ Object
:nodoc:.
-
.enqueue_at(job, timestamp) ⇒ Object
:nodoc:.
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, ) #:nodoc: @monitor.synchronize do PikaQue::RailsWorker.enqueue_at job.serialize, , routing_key: job.queue_name end end |