Class: ActiveJob::QueueAdapters::QuberAdapter
- Inherits:
-
Object
- Object
- ActiveJob::QueueAdapters::QuberAdapter
- Defined in:
- lib/active_job/queue_adapters/quber_adapter.rb
Instance Method Summary collapse
- #enqueue(job, attributes = {}) ⇒ Object
- #enqueue_at(job, timestamp) ⇒ Object
-
#initialize(options = {}) ⇒ QuberAdapter
constructor
A new instance of QuberAdapter.
Constructor Details
#initialize(options = {}) ⇒ QuberAdapter
Returns a new instance of QuberAdapter.
5 6 7 |
# File 'lib/active_job/queue_adapters/quber_adapter.rb', line 5 def initialize = {} @client ||= Quber::Client.new end |
Instance Method Details
#enqueue(job, attributes = {}) ⇒ Object
9 10 11 12 |
# File 'lib/active_job/queue_adapters/quber_adapter.rb', line 9 def enqueue(job, attributes = {}) task = build_task(job, attributes) @client.put task end |
#enqueue_at(job, timestamp) ⇒ Object
14 15 16 |
# File 'lib/active_job/queue_adapters/quber_adapter.rb', line 14 def enqueue_at(job, ) enqueue job, scheduled_at: end |