cadrumo.application.operations._supervisor_execution module

Execution and invocation stages for the durable operation supervisor.

class SupervisorExecutionMixin[source]

Bases: SupervisorHost

Own request binding, executor execution, and durable interaction stages.

async submit(request, *, operation_id=None)[source]

Persist one validated operation request without starting execution.

Return type:

TypeAliasType

Parameters:
async start(operation_id)[source]

Admit one owned registered executor and return its running snapshot.

Every refusal before executor entry is raised here, and admission – the lease held and the running state committed – is durable before this returns. Execution and settlement continue in one supervised task; settled() returns what it concluded, and observers follow its events through the journal meanwhile.

Return type:

OperationPersistedSnapshot

Parameters:
async settled(operation_id)[source]

Return what one started operation concluded once its supervised task ends.

A cancelled wait leaves the operation running. When the task stopped without a commitable settlement, the journal’s state is raised inside OperationUnsettledError with the stopping error as its cause. Without a task in this process, the durable terminal state is awaited.

Return type:

OperationPersistedSnapshot

Parameters:
async submit_transient_financial_operand(requirement, amount)[source]

Answer one running invocation’s declared operand wait with an amount.

The amount is a parameter and is never written to the journal: the broker settles it against the declaration that opened the wait and records only where custody stands.

Return type:

TypeAliasType

Parameters:
async submit_ephemeral_secret(requirement, secret)[source]

Accept one exact-bound mutable secret without serializing or digesting it.

Return type:

None

Parameters:
async await_terminal(operation_id)[source]

Await local commits promptly and bounded durable rechecks after detachment.

Return type:

OperationPersistedSnapshot

Parameters:
async respond(response)[source]

Consume one pending response and resume it when its policy permits.

Return type:

OperationConsumedInteraction

Parameters: