Skip to main content

TaskQueueHandle

Trait TaskQueueHandle 

Source
pub trait TaskQueueHandle: Send + Sync {
    // Required methods
    fn add_task<'life0, 'async_trait>(
        &'life0 self,
        description: String,
        role: String,
        dependencies: Vec<String>,
    ) -> Pin<Box<dyn Future<Output = ArgentorResult<String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_task_info<'life0, 'life1, 'async_trait>(
        &'life0 self,
        task_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = ArgentorResult<Option<TaskInfo>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn list_tasks<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = ArgentorResult<Vec<TaskInfo>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn task_summary<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = ArgentorResult<TaskSummary>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Abstraction over the orchestrator’s task queue. Implemented by the orchestrator crate to avoid circular dependencies.

Required Methods§

Source

fn add_task<'life0, 'async_trait>( &'life0 self, description: String, role: String, dependencies: Vec<String>, ) -> Pin<Box<dyn Future<Output = ArgentorResult<String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Add a new task and return its ID.

Source

fn get_task_info<'life0, 'life1, 'async_trait>( &'life0 self, task_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = ArgentorResult<Option<TaskInfo>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get status info for a specific task.

Source

fn list_tasks<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = ArgentorResult<Vec<TaskInfo>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

List all tasks with summary info.

Source

fn task_summary<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = ArgentorResult<TaskSummary>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get aggregate counts.

Implementors§