pub struct WorkflowExecutor {
storage: Arc<Storage>,
scheduler: Arc<Scheduler>,
num_workers: usize,
registry: Arc<NodeRegistry>,
running: Arc<Mutex<bool>>,
python_manager: Arc<Mutex<Option<Arc<PythonManager>>>>,
}Fields§
§storage: Arc<Storage>§scheduler: Arc<Scheduler>§num_workers: usize§registry: Arc<NodeRegistry>§running: Arc<Mutex<bool>>§python_manager: Arc<Mutex<Option<Arc<PythonManager>>>>Implementations§
Source§impl WorkflowExecutor
impl WorkflowExecutor
Sourcepub fn new(
storage: Arc<Storage>,
num_workers: usize,
registry: Arc<NodeRegistry>,
) -> Self
pub fn new( storage: Arc<Storage>, num_workers: usize, registry: Arc<NodeRegistry>, ) -> Self
Create an asynchronous executor with storage and workers
Sourcepub async fn set_python_manager(&self, manager: Arc<PythonManager>)
pub async fn set_python_manager(&self, manager: Arc<PythonManager>)
Set the Python manager for script execution
Sourcepub async fn get_python_manager(&self) -> Option<Arc<PythonManager>>
pub async fn get_python_manager(&self) -> Option<Arc<PythonManager>>
Get the Python manager if available
pub async fn submit(&self, workflow_id: String, input: Value) -> Result<String>
pub async fn submit_with_execution_id( &self, workflow_id: String, input: Value, execution_id: String, ) -> Result<String>
Sourcepub async fn submit_node(&self, node: Node, input: Value) -> Result<String>
pub async fn submit_node(&self, node: Node, input: Value) -> Result<String>
Submit a single node for execution
pub async fn start(&self)
async fn submit_async( &self, workflow_id: String, input: Value, ) -> Result<String>
async fn submit_async_with_id( &self, workflow_id: String, input: Value, execution_id: String, ) -> Result<String>
async fn try_start(&self) -> bool
fn recover_stalled_tasks(&self)
async fn spawn_workers(&self, num_workers: usize)
Sourceasync fn execute_node(
node: &Node,
input: &NodeInput,
context: &mut ExecutionContext,
registry: Arc<NodeRegistry>,
) -> Result<NodeOutput>
async fn execute_node( node: &Node, input: &NodeInput, context: &mut ExecutionContext, registry: Arc<NodeRegistry>, ) -> Result<NodeOutput>
Resolves Templated
pub async fn get_task_status(&self, task_id: &str) -> Result<Task>
pub async fn get_execution_status( &self, execution_id: &str, ) -> Result<Vec<Task>>
pub async fn list_tasks( &self, workflow_id: Option<&str>, status: Option<TaskStatus>, ) -> Result<Vec<Task>>
Auto Trait Implementations§
impl Freeze for WorkflowExecutor
impl !RefUnwindSafe for WorkflowExecutor
impl Send for WorkflowExecutor
impl Sync for WorkflowExecutor
impl Unpin for WorkflowExecutor
impl !UnwindSafe for WorkflowExecutor
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