Skip to main content

TaskSubmissionPort

Trait TaskSubmissionPort 

Source
pub trait TaskSubmissionPort: Send + Sync {
    // Required method
    fn submit(&self, task_spec: TaskSpec, dependencies: Vec<TaskId>);
}
Expand description

Abstract port through which a handler can propose new child tasks.

The concrete implementation (backed by a tokio mpsc channel) lives in actionqueue-workflow and is injected by the dispatch loop. Using a trait object keeps actionqueue-executor-local free of tokio dependencies.

Submissions are fire-and-forget: if the channel is closed (e.g., the dispatch loop shut down), the submission is silently dropped. Handlers have no error path for submission failures.

Required Methods§

Source

fn submit(&self, task_spec: TaskSpec, dependencies: Vec<TaskId>)

Proposes a new task for creation.

The dispatch loop validates and WAL-appends the task on the next tick. The submitted task_spec should have parent_task_id set to associate it with the Coordinator’s task.

dependencies is the list of TaskIds that must reach terminal success before this task’s runs are promoted to Ready.

Implementors§