minos.saga.definitions.steps.local module

class minos.saga.definitions.steps.local.LocalSagaStep(on_execute=None, on_failure=None, **kwargs)[source]

Bases: minos.saga.definitions.steps.abc.SagaStep

Local Saga Step class.

__init__(on_execute=None, on_failure=None, **kwargs)[source]
commit(*args, **kwargs)

Commit the current SagaStep on the Saga.

Parameters
  • args – Additional positional arguments.

  • kwargs – Additional named arguments.

Return type

Saga

Returns

A Saga instance.

conditional_step(*args, **kwargs)

Create a new conditional step in the Saga.

Parameters
  • args – Additional positional parameters.

  • kwargs – Additional named parameters.

Return type

ConditionalSagaStep

Returns

A new SagaStep instance.

classmethod from_raw(raw, **kwargs)

Build a new instance from raw.

Parameters
Return type

minos.saga.definitions.steps.abc.SagaStep

Returns

A SagaStep instance.

local_step(*args, **kwargs)

Create a new local step in the Saga.

Parameters
  • args – Additional positional parameters.

  • kwargs – Additional named parameters.

Return type

LocalSagaStep

Returns

A new SagaStep instance.

on_execute(callback, parameters=None, **kwargs)[source]

On execute method.

Parameters
Return type

minos.saga.definitions.steps.local.LocalSagaStep

Returns

A self reference.

on_failure(callback, parameters=None, **kwargs)[source]

On failure method.

Parameters
Return type

minos.saga.definitions.steps.local.LocalSagaStep

Returns

A self reference.

property raw: dict[str, typing.Any]

Generate a raw representation of the instance.

Return type

dict[str, typing.Any]

Returns

A dict instance.

remote_step(*args, **kwargs)

Create a new remote step in the Saga.

Parameters
  • args – Additional positional parameters.

  • kwargs – Additional named parameters.

Return type

RemoteSagaStep

Returns

A new SagaStep instance.

step(*args, **kwargs)

Create a new step in the Saga.

Parameters
  • args – Additional positional parameters.

  • kwargs – Additional named parameters.

Return type

minos.saga.definitions.steps.abc.SagaStep

Returns

A new SagaStep instance.

validate()[source]

Check if the step is valid.

Return type

None

Returns

This method does not return anything, but raises an exception if the step is not valid.