pub struct Scheduler { /* private fields */ }Implementations§
Source§impl Scheduler
impl Scheduler
pub fn new(storage: Arc<dyn TaskStorage>, config: SchedulerConfig) -> Self
pub async fn submit_task(&self, definition: TaskDefinition) -> Result<String>
pub async fn start(&self) -> Result<()>
pub async fn get_next_task(&self) -> Option<Task>
pub async fn complete_task( &self, task_id: &str, success: bool, output: Option<String>, error: Option<String>, ) -> Result<()>
pub async fn cancel_task(&self, task_id: &str) -> Result<()>
pub async fn get_task_status(&self, task_id: &str) -> Result<Option<TaskStatus>>
pub async fn list_tasks(&self, status: Option<TaskStatus>) -> Result<Vec<Task>>
Auto Trait Implementations§
impl !RefUnwindSafe for Scheduler
impl !UnwindSafe for Scheduler
impl Freeze for Scheduler
impl Send for Scheduler
impl Sync for Scheduler
impl Unpin for Scheduler
impl UnsafeUnpin for Scheduler
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