minos.saga.executions.steps.conditional
Classes
Conditional Saga Step Execution class. |
- class ConditionalSagaStepExecution[source]
Bases:
SagaStepExecutionConditional Saga Step Execution class.
- definition: ConditionalSagaStep
- __init__(*args, inner=None, **kwargs)[source]
- Parameters
inner (Optional[SagaExecution]) –
- inner: Optional[SagaExecution]
- async execute(context, *args, **kwargs)[source]
Execution the step.
- Parameters
context (SagaContext) – The execution context to be used during the execution.
args – Additional positional arguments.
kwargs – Additional named arguments.
- Returns
The updated context.
- Return type
- async rollback(context, *args, **kwargs)[source]
Revert the executed step.
- Parameters
context (SagaContext) – Execution context.
args – Additional positional arguments.
kwargs – Additional named arguments.
- Returns
The updated execution context.
- Return type
- property raw: dict[str, Any]
Compute a raw representation of the instance.
- Returns
A
dictinstance.
- static from_definition(step)
Build a
SagaStepExecutioninstance from theSagaStepdefinition.- Parameters
step (SagaStep) – The
SagaStepdefinition.- Returns
A new
SagaStepExecution.- Return type