Application-owned execution boundary for serializable task work.
The durable record contains a Snodo.Extensions.Tasks.Work value rather than a
process-local function. A runner resolves that value through a configured
executor after every initial claim or recovery claim. Executor configuration
uses {module, state} so applications can rebuild runtime state when their
supervision tree restarts without placing it in the descriptor.
{:failed, error, status_message} is terminal. An executor opts into the
descriptor's next persisted retry delay only by returning
{:retry, error, status_message}. Exceptions, exits, and invalid outcomes
are returned as invocation errors so the runner can fail closed.
Summary
Functions
Safely invokes an executor and validates its runner-compatible outcome.
Validates an executor reference and returns it unchanged.
Types
Callbacks
@callback execute( Snodo.Extensions.Tasks.Work.t(), Snodo.Cancellation.t(), state :: term() ) :: outcome()
Functions
@spec invoke(ref(), Snodo.Extensions.Tasks.Work.t(), Snodo.Cancellation.t()) :: {:ok, outcome()} | {:error, term()}
Safely invokes an executor and validates its runner-compatible outcome.
Validates an executor reference and returns it unchanged.