pub struct RedisBackend { /* private fields */ }Expand description
Redis queue backend
Implementations§
Trait Implementations§
Source§impl QueueBackend for RedisBackend
impl QueueBackend for RedisBackend
Source§fn enqueue<'life0, 'async_trait>(
&'life0 self,
job: JobWrapper,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn enqueue<'life0, 'async_trait>(
&'life0 self,
job: JobWrapper,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Enqueue a job
Source§fn dequeue<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<JobWrapper>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn dequeue<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<JobWrapper>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Dequeue the next available job
Source§fn complete<'life0, 'life1, 'async_trait>(
&'life0 self,
_job_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn complete<'life0, 'life1, 'async_trait>(
&'life0 self,
_job_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Mark a job as completed
Source§fn fail<'life0, 'life1, 'async_trait>(
&'life0 self,
job_id: &'life1 str,
error: String,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn fail<'life0, 'life1, 'async_trait>(
&'life0 self,
job_id: &'life1 str,
error: String,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Mark a job as failed
Source§fn retry<'life0, 'async_trait>(
&'life0 self,
job: JobWrapper,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn retry<'life0, 'async_trait>(
&'life0 self,
job: JobWrapper,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Retry a job
Source§fn move_to_dead_letter<'life0, 'async_trait>(
&'life0 self,
job: JobWrapper,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn move_to_dead_letter<'life0, 'async_trait>(
&'life0 self,
job: JobWrapper,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Move a job to the dead letter queue
Source§fn list_dead_letter<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<JobWrapper>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_dead_letter<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<JobWrapper>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List jobs in the dead letter queue
Auto Trait Implementations§
impl Freeze for RedisBackend
impl RefUnwindSafe for RedisBackend
impl Send for RedisBackend
impl Sync for RedisBackend
impl Unpin for RedisBackend
impl UnsafeUnpin for RedisBackend
impl UnwindSafe for RedisBackend
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
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