pub struct BackgroundExecutionQueue { /* private fields */ }Expand description
BackgroundExecutionQueue - Queue for managing background executions This is an in-memory implementation for testing. Production uses Redis/Postgres.
Implementations§
Source§impl BackgroundExecutionQueue
impl BackgroundExecutionQueue
Sourcepub fn enqueue(&mut self, execution: BackgroundExecution)
pub fn enqueue(&mut self, execution: BackgroundExecution)
Enqueue a new execution
Sourcepub fn dequeue(&mut self) -> Option<BackgroundExecution>
pub fn dequeue(&mut self) -> Option<BackgroundExecution>
Dequeue the next execution to run
Sourcepub fn peek(&self) -> Option<&BackgroundExecution>
pub fn peek(&self) -> Option<&BackgroundExecution>
Peek at the next execution without removing it
Sourcepub fn execution_ids(&self) -> Vec<ExecutionId>
pub fn execution_ids(&self) -> Vec<ExecutionId>
Get all queued execution IDs
Trait Implementations§
Source§impl Debug for BackgroundExecutionQueue
impl Debug for BackgroundExecutionQueue
Source§impl Default for BackgroundExecutionQueue
impl Default for BackgroundExecutionQueue
Source§fn default() -> BackgroundExecutionQueue
fn default() -> BackgroundExecutionQueue
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BackgroundExecutionQueue
impl RefUnwindSafe for BackgroundExecutionQueue
impl Send for BackgroundExecutionQueue
impl Sync for BackgroundExecutionQueue
impl Unpin for BackgroundExecutionQueue
impl UnsafeUnpin for BackgroundExecutionQueue
impl UnwindSafe for BackgroundExecutionQueue
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