minos.saga.definitions.steps.local

Classes

LocalSagaStep

Local Saga Step class.

class LocalSagaStep[source]

Bases: SagaStep

Local Saga Step class.

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

On execute method.

Parameters
Returns

A self reference.

Return type

LocalSagaStep

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

On failure method.

Parameters
Returns

A self reference.

Return type

LocalSagaStep

validate()[source]

Check if the step is valid.

Returns

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

Return type

None

property raw: dict[str, Any]

Generate a raw representation of the instance.

Returns

A dict instance.

commit(*args, **kwargs)

Commit the current SagaStep on the Saga.

Parameters
  • args – Additional positional arguments.

  • kwargs – Additional named arguments.

Returns

A Saga instance.

Return type

Saga

conditional_step(*args, **kwargs)

Create a new conditional step in the Saga.

Parameters
  • args – Additional positional parameters.

  • kwargs – Additional named parameters.

Returns

A new SagaStep instance.

Return type

ConditionalSagaStep

classmethod from_raw(raw, **kwargs)

Build a new instance from raw.

Parameters
Returns

A SagaStep instance.

Return type

SagaStep

local_step(*args, **kwargs)

Create a new local step in the Saga.

Parameters
  • args – Additional positional parameters.

  • kwargs – Additional named parameters.

Returns

A new SagaStep instance.

Return type

LocalSagaStep

remote_step(*args, **kwargs)

Create a new remote step in the Saga.

Parameters
  • args – Additional positional parameters.

  • kwargs – Additional named parameters.

Returns

A new SagaStep instance.

Return type

RemoteSagaStep

step(*args, **kwargs)

Create a new step in the Saga.

Parameters
  • args – Additional positional parameters.

  • kwargs – Additional named parameters.

Returns

A new SagaStep instance.

Return type

SagaStep