Durable.Executor (Durable v0.1.0-rc)
View SourceThe main workflow executor.
Responsible for:
- Starting new workflow executions
- Executing workflow steps sequentially
- Managing workflow state and context
- Handling workflow suspension and resumption
Summary
Functions
Cancels a running or pending workflow.
Executes a workflow by ID.
Resumes a waiting workflow.
Starts a new workflow execution.
Functions
Cancels a running or pending workflow.
@spec execute_workflow(String.t(), Durable.Config.t()) :: {:ok, map()} | {:waiting, map()} | {:error, term()}
Executes a workflow by ID.
This is called internally by queue workers or directly for immediate execution.
Resumes a waiting workflow.
Options
:inline- If true, execute synchronously instead of via queue (default: false):durable- The Durable instance name (default: Durable)
Starts a new workflow execution.
Options
:workflow- The workflow name (optional, uses default if not specified):queue- The queue to use (default: "default"):priority- Priority level (default: 0):scheduled_at- Schedule for future execution:durable- The Durable instance name (default: Durable)
Returns
{:ok, workflow_id}on success{:error, reason}on failure