Class: ActiveJob::QueueAdapters::AbstractAdapter
- Inherits:
-
Object
- Object
- ActiveJob::QueueAdapters::AbstractAdapter
- Defined in:
- lib/active_job/queue_adapters/abstract_adapter.rb
Overview
Active Job Abstract Adapter
Active Job supports multiple job queue systems. ActiveJob::QueueAdapters::AbstractAdapter forms the abstraction layer which makes this possible.
Direct Known Subclasses
AsyncAdapter, BackburnerAdapter, DelayedJobAdapter, InlineAdapter, QueueClassicAdapter, ResqueAdapter, SidekiqAdapter, SneakersAdapter, SuckerPunchAdapter, TestAdapter
Instance Method Summary collapse
- #enqueue(job) ⇒ Object
-
#enqueue_after_transaction_commit? ⇒ Boolean
Defines whether enqueuing should happen implicitly to after commit when called from inside a transaction.
- #enqueue_at(job, timestamp) ⇒ Object
Instance Method Details
#enqueue(job) ⇒ Object
18 19 20 |
# File 'lib/active_job/queue_adapters/abstract_adapter.rb', line 18 def enqueue(job) raise NotImplementedError end |
#enqueue_after_transaction_commit? ⇒ Boolean
Defines whether enqueuing should happen implicitly to after commit when called from inside a transaction. Most adapters should return true, but some adapters that use the same database as Active Record and are transaction aware can return false to continue enqueuing jobs as part of the transaction.
14 15 16 |
# File 'lib/active_job/queue_adapters/abstract_adapter.rb', line 14 def enqueue_after_transaction_commit? true end |
#enqueue_at(job, timestamp) ⇒ Object
22 23 24 |
# File 'lib/active_job/queue_adapters/abstract_adapter.rb', line 22 def enqueue_at(job, ) raise NotImplementedError end |