pub struct WorkflowExecutor<E: TaskExecutor> { /* private fields */ }Expand description
Workflow executor.
Implementations§
Source§impl<E: TaskExecutor> WorkflowExecutor<E>
impl<E: TaskExecutor> WorkflowExecutor<E>
Sourcepub fn new(config: ExecutorConfig, task_executor: E) -> Self
pub fn new(config: ExecutorConfig, task_executor: E) -> Self
Create a new workflow executor.
Sourcepub async fn execute(
&self,
workflow_id: String,
execution_id: String,
dag: WorkflowDag,
) -> Result<WorkflowState>
pub async fn execute( &self, workflow_id: String, execution_id: String, dag: WorkflowDag, ) -> Result<WorkflowState>
Execute a workflow.
Sourcepub async fn resume(&self, execution_id: String) -> Result<WorkflowState>
pub async fn resume(&self, execution_id: String) -> Result<WorkflowState>
Resume a workflow from a saved checkpoint.
This method reconstructs the DAG from the checkpoint and continues execution from where it left off, handling:
- Completed tasks (skipped)
- Interrupted tasks (reset to pending for retry)
- Failed tasks (depending on configuration)
- Pending tasks (executed normally)
Sourcepub async fn resume_from_sequence(
&self,
execution_id: String,
sequence: u64,
) -> Result<WorkflowState>
pub async fn resume_from_sequence( &self, execution_id: String, sequence: u64, ) -> Result<WorkflowState>
Resume a workflow from a specific checkpoint sequence.
Sourcepub async fn get_recovery_info(
&self,
execution_id: &str,
) -> Result<RecoveryInfo>
pub async fn get_recovery_info( &self, execution_id: &str, ) -> Result<RecoveryInfo>
Get recovery information for an execution.
Auto Trait Implementations§
impl<E> !Freeze for WorkflowExecutor<E>
impl<E> !RefUnwindSafe for WorkflowExecutor<E>
impl<E> Send for WorkflowExecutor<E>
impl<E> Sync for WorkflowExecutor<E>
impl<E> Unpin for WorkflowExecutor<E>
impl<E> UnsafeUnpin for WorkflowExecutor<E>
impl<E> !UnwindSafe for WorkflowExecutor<E>
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