Exception: Servus::Events::Errors::AsyncBackendMissingError
- Inherits:
-
Error
- Object
- StandardError
- Error
- Servus::Events::Errors::AsyncBackendMissingError
- Defined in:
- lib/servus/events/errors.rb
Overview
Raised when an event invocation cannot be enqueued because ActiveJob is not loaded.
Event invocation is always asynchronous, so an event that reacts to
anything needs a job backend. Servus's core — services, schemas, guards,
and the bus itself — works without one; only enqueue declarations
require it.
Class Method Summary collapse
Class Method Details
.for(service) ⇒ AsyncBackendMissingError
28 29 30 31 32 33 34 |
# File 'lib/servus/events/errors.rb', line 28 def self.for(service) new( "Cannot enqueue #{service} from an event: ActiveJob is not loaded. " \ 'Event invocation is always asynchronous and runs through ActiveJob. ' \ 'Require active_job, or remove the enqueue declaration.' ) end |