minos.saga.executions.steps.conditional
Classes
Conditional Saga Step Execution class. |
- class ConditionalSagaStepExecution[source]
Bases:
SagaStepExecution
Conditional 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
dict
instance.
- static from_definition(step)
Build a
SagaStepExecution
instance from theSagaStep
definition.- Parameters
step (SagaStep) – The
SagaStep
definition.- Returns
A new
SagaStepExecution
.- Return type