Class: OmniService::Async
- Inherits:
-
Object
- Object
- OmniService::Async
- Extended by:
- Dry::Initializer
- Defined in:
- lib/omni_service/async.rb
Overview
Wraps operation execution in a background job (ActiveJob). Returns immediately with Success(job_id: …) instead of operation result.
Defined Under Namespace
Modules: Convenience
Instance Method Summary collapse
Instance Method Details
#call(*params, **context) ⇒ Object
102 103 104 105 |
# File 'lib/omni_service/async.rb', line 102 def call(*params, **context) job = job_class.set().perform_later(container_class, container_method, params, context) Success(job_id: job.provider_job_id) end |