minos.saga.executions.steps.remote
Classes
Saga Execution Step class. |
- class RemoteSagaStepExecution[source]
Bases:
SagaStepExecution
Saga Execution Step class.
- async execute(context, response=None, *args, **kwargs)[source]
Execution the remote step.
- Parameters
context (SagaContext) – The execution context to be used during the execution.
response (Optional[SagaResponse]) – An optional command response instance (to be consumed by the on_success method).
args – Additional positional arguments.
kwargs – Additional named arguments.
- Returns
The updated context.
- Return type
- async rollback(context, *args, **kwargs)[source]
Revert the executed remote step.
- Parameters
context (SagaContext) – Execution context.
args – Additional positional arguments.
kwargs – Additional named arguments.
- Returns
The updated execution context.
- Return type
- __init__(definition, related_services=None, status=SagaStepStatus.Created, already_rollback=False)
- static from_definition(step)
Build a
SagaStepExecution
instance from theSagaStep
definition.- Parameters
step (SagaStep) – The
SagaStep
definition.- Returns
A new
SagaStepExecution
.- Return type