class ActiveJob::QueueAdapters::ResqueAdapter
Rails.application.config.active_job.queue_adapter = :resque
To use Resque set the queue_adapter config to :resque
.
Read more about Resque here.
them later.
background jobs, placing those jobs on multiple queues, and processing
Resque (pronounced like “rescue”) is a Redis-backed library for creating
== Resque adapter for Active Job
def enqueue(job) #:nodoc:
def enqueue(job) #:nodoc: JobWrapper.instance_variable_set(:@queue, job.queue_name) Resque.enqueue_to job.queue_name, JobWrapper, job.serialize end
def enqueue_at(job, timestamp) #:nodoc:
def enqueue_at(job, timestamp) #:nodoc: unless Resque.respond_to?(:enqueue_at_with_queue) raise NotImplementedError, "To be able to schedule jobs with Resque you need the " \ "resque-scheduler gem. Please add it to your Gemfile and run bundle install" end Resque.enqueue_at_with_queue job.queue_name, timestamp, JobWrapper, job.serialize end