pub struct SyncQueue { /* private fields */ }Implementations§
Source§impl SyncQueue
impl SyncQueue
pub fn new() -> Self
pub async fn enqueue( &self, repo_root: &str, tool: &str, directory: &str, force: bool, ) -> (String, bool)
pub async fn get(&self, id: &str) -> Option<SyncJob>
pub async fn get_pending(&self, key: &QueueKey) -> Option<SyncJob>
pub async fn start(&self, id: &str) -> bool
pub async fn complete(&self, id: &str, job_stats: SyncStats)
pub async fn fail(&self, id: &str, error: String)
pub async fn wait(&self, id: &str, timeout: Duration) -> Option<SyncState>
pub async fn list_queues(&self) -> Vec<QueueInfo>
pub async fn cleanup_old(&self, max_age: Duration)
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for SyncQueue
impl !UnwindSafe for SyncQueue
impl Freeze for SyncQueue
impl Send for SyncQueue
impl Sync for SyncQueue
impl Unpin for SyncQueue
impl UnsafeUnpin for SyncQueue
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