Class: ActiveJob::QueueAdapters::PgbusAdapter
- Inherits:
-
Object
- Object
- ActiveJob::QueueAdapters::PgbusAdapter
- Defined in:
- lib/active_job/queue_adapters/pgbus_adapter.rb
Overview
Adapter for Rails ActiveJob integration with Pgbus.
This class lives in the ActiveJob::QueueAdapters namespace so that Rails can find it via const_get(“PgbusAdapter”) — the standard lookup mechanism used across all Rails versions (7.1+).
Usage:
config.active_job.queue_adapter = :pgbus
Instance Method Summary collapse
- #enqueue_after_transaction_commit? ⇒ Boolean
-
#stopping? ⇒ Boolean
Called by ActiveJob::Continuation (Rails 8.1+) at each checkpoint.
Instance Method Details
#enqueue_after_transaction_commit? ⇒ Boolean
18 19 20 |
# File 'lib/active_job/queue_adapters/pgbus_adapter.rb', line 18 def enqueue_after_transaction_commit? true end |
#stopping? ⇒ Boolean
Called by ActiveJob::Continuation (Rails 8.1+) at each checkpoint. When true, continuable jobs save their cursor and re-enqueue themselves so the worker can shut down gracefully.
25 26 27 |
# File 'lib/active_job/queue_adapters/pgbus_adapter.rb', line 25 def stopping? Pgbus.stopping end |