pub struct DagExecutor { /* private fields */ }Expand description
Executes DAGs of tasks with persistence, fault-tolerance and observability.
Implementations§
Source§impl DagExecutor
impl DagExecutor
Sourcepub fn builder() -> DagExecutorBuilder
pub fn builder() -> DagExecutorBuilder
Start building an executor.
Sourcepub fn metrics(&self) -> &Arc<MetricsCollector>
pub fn metrics(&self) -> &Arc<MetricsCollector>
Access the metrics collector (live during a run).
Sourcepub fn dead_letter(&self) -> &DeadLetterQueue
pub fn dead_letter(&self) -> &DeadLetterQueue
Access the dead-letter queue.
Sourcepub async fn run(&self, dag: Dag) -> Result<ExecutionReport>
pub async fn run(&self, dag: Dag) -> Result<ExecutionReport>
Run dag to completion with a fresh context.
Sourcepub async fn run_with_context(
&self,
dag: Dag,
ctx: Arc<Context>,
) -> Result<ExecutionReport>
pub async fn run_with_context( &self, dag: Dag, ctx: Arc<Context>, ) -> Result<ExecutionReport>
Run dag using a caller-supplied Context.
This is the hook for graceful shutdown: hold a clone of ctx and call
Context::cancel (e.g. on SIGINT) to stop scheduling new work.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for DagExecutor
impl !UnwindSafe for DagExecutor
impl Freeze for DagExecutor
impl Send for DagExecutor
impl Sync for DagExecutor
impl Unpin for DagExecutor
impl UnsafeUnpin for DagExecutor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more