pub struct TaskManager { /* private fields */ }Implementations§
Source§impl TaskManager
impl TaskManager
pub fn new(ctx: &AppContext) -> Result<Self, String>
pub fn with_storage(ctx: &AppContext) -> Result<Self, String>
Sourcepub async fn execute_queued_task(
&self,
task: &Task,
) -> Result<TaskExecutionResult, TaskExecutionError>
pub async fn execute_queued_task( &self, task: &Task, ) -> Result<TaskExecutionResult, TaskExecutionError>
Execute a task from the queue (with status updates)
Sourcepub async fn delete_task(&self, task_id: &str) -> Result<(), String>
pub async fn delete_task(&self, task_id: &str) -> Result<(), String>
Delete a specific task and its associated directory
Sourcepub async fn clean_tasks(&self) -> Result<usize, String>
pub async fn clean_tasks(&self) -> Result<usize, String>
Delete all completed tasks
Sourcepub async fn retry_task(
&self,
task_id: &str,
edit_instructions: bool,
ctx: &AppContext,
) -> Result<String, String>
pub async fn retry_task( &self, task_id: &str, edit_instructions: bool, ctx: &AppContext, ) -> Result<String, String>
Retry a task by creating a new task with the same instructions
Auto Trait Implementations§
impl Freeze for TaskManager
impl !RefUnwindSafe for TaskManager
impl Send for TaskManager
impl Sync for TaskManager
impl Unpin for TaskManager
impl !UnwindSafe for TaskManager
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