minos.saga.executions.steps.local
Classes
Local Saga Step Execution class. |
- class LocalSagaStepExecution[source]
Bases:
SagaStepExecution
Local Saga Step Execution class.
- async execute(context, *args, **kwargs)[source]
Execute the local saga step.
- Parameters
context (SagaContext) – The execution context.
args – Additional positional arguments.
kwargs – Additional named arguments.
- Returns
The new saga context.
- Return type
- async rollback(context, *args, **kwargs)[source]
Rollback the local saga context.
- Parameters
context (SagaContext) – The execution context.
args – Additional positional arguments.
kwargs – Additional named arguments.
- Returns
The new saga 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