Class: Railbox::Queue::BaseQueue
- Inherits:
-
Object
- Object
- Railbox::Queue::BaseQueue
- Defined in:
- lib/railbox/queue/base_queue.rb
Overview
Abstract base class for enqueuing tasks into the transactional outbox.
This class is intended to be subclassed: descendants should implement their own logic for enqueuing tasks.
Usage example:
class MyQueue < Railbox::BaseQueue
def self.enqueue(**opts)
# your implementation here
end
end
The .enqueue method must be implemented in each subclass. Calling .enqueue directly on BaseQueue will raise NotImplementedError.
Direct Known Subclasses
Class Method Summary collapse
-
.enqueue(**_) ⇒ Object
Abstract method for enqueuing a task into the outbox.
Class Method Details
.enqueue(**_) ⇒ Object
Abstract method for enqueuing a task into the outbox.
Each subclass must override this method with specific logic.
26 27 28 |
# File 'lib/railbox/queue/base_queue.rb', line 26 def enqueue(**_) raise NotImplementedError, 'You must implement this method' end |