minos.saga.executions.executors.local module¶
- class minos.saga.executions.executors.local.LocalExecutor(execution_uuid, *args, **kwargs)[source]¶
Bases:
minos.saga.executions.executors.abc.ExecutorLocal Executor class.
- __init__(execution_uuid, *args, **kwargs)¶
- async exec(operation, context, *args, **kwargs)[source]¶
Execute the commit operation.
- Parameters
operation (
typing.Optional[minos.saga.definitions.operations.SagaOperation[collections.abc.Callable[minos.saga.context.SagaContext, …,typing.Union[minos.saga.context.SagaContext,None,typing.Awaitable[typing.Optional[minos.saga.context.SagaContext]]]]]]) – Operation to be executed.context (
minos.saga.context.SagaContext) – Actual execution context.args – Additional positional arguments.
kwargs – Additional named arguments.
- Return type
- Returns
An updated context instance.
- async exec_function(func, *args, **kwargs)¶
Execute a function.
- Parameters
func (
typing.Callable) – Function to be executed.args – Additional positional arguments to the function.
kwargs – Additional named arguments to the function.
- Return type
typing.Any- Returns
The
funcresult.