Class: ActiveJob::QueueAdapters::QuAdapter
- Inherits:
-
Object
- Object
- ActiveJob::QueueAdapters::QuAdapter
- Defined in:
- lib/active_job/queue_adapters/qu_adapter.rb
Overview
Qu adapter for Active Job
Qu is a Ruby library for queuing and processing background jobs. It is heavily inspired by delayed_job and Resque. Qu was created to overcome some shortcomings in the existing queuing libraries. The advantages of Qu are: Multiple backends (redis, mongo), jobs are requeued when worker is killed, resque-like API.
Read more about Qu here.
To use Qu set the queue_adapter config to :qu.
Rails.application.config.active_job.queue_adapter = :qu
Defined Under Namespace
Classes: JobWrapper
Class Method Summary collapse
-
.enqueue(job, *args) ⇒ Object
:nodoc:.
-
.enqueue_at(job, timestamp, *args) ⇒ Object
:nodoc:.
Class Method Details
.enqueue(job, *args) ⇒ Object
:nodoc:
20 21 22 23 24 |
# File 'lib/active_job/queue_adapters/qu_adapter.rb', line 20 def enqueue(job, *args) #:nodoc: Qu::Payload.new(klass: JobWrapper, args: [job.serialize]).tap do |payload| payload.instance_variable_set(:@queue, job.queue_name) end.push end |
.enqueue_at(job, timestamp, *args) ⇒ Object
:nodoc:
26 27 28 |
# File 'lib/active_job/queue_adapters/qu_adapter.rb', line 26 def enqueue_at(job, , *args) #:nodoc: raise NotImplementedError end |