Class: ActiveJob::QueueAdapters::QueAdapter
- Inherits:
-
Object
- Object
- ActiveJob::QueueAdapters::QueAdapter
- Defined in:
- lib/que/active_job/extensions.rb,
lib/que/active_job/extensions.rb
Defined Under Namespace
Classes: JobWrapper
Instance Method Summary collapse
Instance Method Details
#enqueue(job) ⇒ Object
120 121 122 123 124 125 |
# File 'lib/que/active_job/extensions.rb', line 120 def enqueue(job) = { priority: job.priority, queue: job.queue_name } que_job = JobWrapper.enqueue job.serialize, ** job.provider_job_id = que_job.attrs["job_id"] que_job end |
#enqueue_at(job, timestamp) ⇒ Object
127 128 129 130 131 132 |
# File 'lib/que/active_job/extensions.rb', line 127 def enqueue_at(job, ) = { priority: job.priority, queue: job.queue_name, run_at: Time.at() } que_job = JobWrapper.enqueue job.serialize, ** job.provider_job_id = que_job.attrs["job_id"] que_job end |