Class: ActiveJob::QueueAdapters::ResqueAdapter
- Inherits:
-
Object
- Object
- ActiveJob::QueueAdapters::ResqueAdapter
- Defined in:
- lib/active_job/queue_adapters/resque_adapter.rb
Defined Under Namespace
Classes: JobWrapper
Class Method Summary collapse
Class Method Details
.enqueue(job) ⇒ Object
19 20 21 |
# File 'lib/active_job/queue_adapters/resque_adapter.rb', line 19 def enqueue(job) Resque.enqueue_to job.queue_name, JobWrapper, job.serialize end |
.enqueue_at(job, timestamp) ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/active_job/queue_adapters/resque_adapter.rb', line 23 def enqueue_at(job, ) 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, , JobWrapper, job.serialize end |