pub struct SyncQueue { /* private fields */ }Implementations§
Trait Implementations§
Source§impl Queue for SyncQueue
impl Queue for SyncQueue
Source§fn release<'life0, 'async_trait>(
&'life0 self,
job: JobBox,
attempts: u64,
delay_seconds: u64,
) -> Pin<Box<dyn Future<Output = Result<(), JobError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn release<'life0, 'async_trait>(
&'life0 self,
job: JobBox,
attempts: u64,
delay_seconds: u64,
) -> Pin<Box<dyn Future<Output = Result<(), JobError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sync jobs run exactly once per push — a failed attempt is not retried.
fn push<'life0, 'async_trait>(
&'life0 self,
job: JobBox,
) -> Pin<Box<dyn Future<Output = Result<(), JobError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn pop<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<(JobBox, u64)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn pop<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<(JobBox, u64)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Pop the next available job together with the number of attempts it has
already consumed (including this one).
fn count<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = usize> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn name(&self) -> &str
Source§fn push_delayed<'life0, 'async_trait>(
&'life0 self,
job: JobBox,
delay_seconds: u64,
) -> Pin<Box<dyn Future<Output = Result<(), JobError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn push_delayed<'life0, 'async_trait>(
&'life0 self,
job: JobBox,
delay_seconds: u64,
) -> Pin<Box<dyn Future<Output = Result<(), JobError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Push a job that must not be processed before
delay_seconds have
elapsed. The default implementation pushes immediately; backends
that support delayed delivery override this.Source§fn fail<'life0, 'async_trait>(
&'life0 self,
job: JobBox,
exception: String,
) -> Pin<Box<dyn Future<Output = Result<(), JobError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn fail<'life0, 'async_trait>(
&'life0 self,
job: JobBox,
exception: String,
) -> Pin<Box<dyn Future<Output = Result<(), JobError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Mark a job as permanently failed.
exception carries the failure
reason (mirrors Laravel’s queue.failer recording). The default
implementation drops the job.Source§fn job_succeeded<'life0, 'async_trait>(
&'life0 self,
_job: JobBox,
) -> Pin<Box<dyn Future<Output = Result<(), JobError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn job_succeeded<'life0, 'async_trait>(
&'life0 self,
_job: JobBox,
) -> Pin<Box<dyn Future<Output = Result<(), JobError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Called by the worker after a job finishes successfully. Queues that
track batch progress (e.g.
DatabaseQueue) override this.Auto Trait Implementations§
impl Freeze for SyncQueue
impl RefUnwindSafe for SyncQueue
impl Send for SyncQueue
impl Sync for SyncQueue
impl Unpin for SyncQueue
impl UnsafeUnpin for SyncQueue
impl UnwindSafe 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Event for T
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more