Class: ActiveJob::QueueAdapters::ShinqAdapter
- Inherits:
-
Object
- Object
- ActiveJob::QueueAdapters::ShinqAdapter
- Defined in:
- lib/shinq/active_job/queue_adapters/shinq_adapter.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.enqueue(job) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/shinq/active_job/queue_adapters/shinq_adapter.rb', line 13 def enqueue(job) Shinq::Client.enqueue( table_name: job.queue_name, job_id: job.job_id, args: job.arguments.first ) end |
.enqueue_at(job, timestamp) ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'lib/shinq/active_job/queue_adapters/shinq_adapter.rb', line 21 def enqueue_at(job, ) Shinq::Client.enqueue( table_name: job.queue_name, job_id: job.job_id, args: job.arguments.first, scheduled_at: , ) end |
Instance Method Details
#enqueue(job) ⇒ Object
4 5 6 |
# File 'lib/shinq/active_job/queue_adapters/shinq_adapter.rb', line 4 def enqueue(job) self.class.enqueue job end |
#enqueue_at(job, timestamp) ⇒ Object
8 9 10 |
# File 'lib/shinq/active_job/queue_adapters/shinq_adapter.rb', line 8 def enqueue_at(job, ) self.class.enqueue_at job, end |