minos.saga.executions.steps.local
Classes
Local Saga Step Execution class. |
- class LocalSagaStepExecution[source]
Bases:
SagaStepExecutionLocal 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
SagaStepExecutioninstance from theSagaStepdefinition.- Parameters
step (SagaStep) – The
SagaStepdefinition.- Returns
A new
SagaStepExecution.- Return type