Class: ActiveJob::QueueAdapters::SkiplockAdapter
- Inherits:
-
Object
- Object
- ActiveJob::QueueAdapters::SkiplockAdapter
- Defined in:
- lib/active_job/queue_adapters/skiplock_adapter.rb
Instance Method Summary collapse
- #enqueue(job) ⇒ Object
- #enqueue_at(job, timestamp) ⇒ Object
-
#initialize ⇒ SkiplockAdapter
constructor
A new instance of SkiplockAdapter.
Constructor Details
#initialize ⇒ SkiplockAdapter
Returns a new instance of SkiplockAdapter.
4 5 6 |
# File 'lib/active_job/queue_adapters/skiplock_adapter.rb', line 4 def initialize Rails.application.config.after_initialize { Rails.application.config.skiplock = Skiplock::Manager.new } end |
Instance Method Details
#enqueue(job) ⇒ Object
8 9 10 |
# File 'lib/active_job/queue_adapters/skiplock_adapter.rb', line 8 def enqueue(job) Skiplock::Job.enqueue(job) end |
#enqueue_at(job, timestamp) ⇒ Object
12 13 14 |
# File 'lib/active_job/queue_adapters/skiplock_adapter.rb', line 12 def enqueue_at(job, ) Skiplock::Job.enqueue_at(job, ) end |