pub struct QueueService { /* private fields */ }Expand description
Service responsible for managing a Redis queue.
Implementations§
Source§impl QueueService
impl QueueService
Sourcepub fn new(conn: Connection) -> Self
pub fn new(conn: Connection) -> Self
Sourcepub async fn connect() -> Connection
pub async fn connect() -> Connection
Trait Implementations§
Source§impl QueueServiceTrait for QueueService
impl QueueServiceTrait for QueueService
Source§fn add_job<'life0, 'life1, 'async_trait>(
&'life0 mut self,
queue_name: &'life1 str,
job: JobData,
) -> Pin<Box<dyn Future<Output = RedisResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn add_job<'life0, 'life1, 'async_trait>(
&'life0 mut self,
queue_name: &'life1 str,
job: JobData,
) -> Pin<Box<dyn Future<Output = RedisResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn get_next_job<'life0, 'life1, 'async_trait>(
&'life0 mut self,
queue_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = RedisResult<Option<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_next_job<'life0, 'life1, 'async_trait>(
&'life0 mut self,
queue_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = RedisResult<Option<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn count_jobs<'life0, 'life1, 'async_trait>(
&'life0 mut self,
queue_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = RedisResult<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn count_jobs<'life0, 'life1, 'async_trait>(
&'life0 mut self,
queue_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = RedisResult<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn move_to_failed<'life0, 'life1, 'async_trait>(
&'life0 mut self,
queue_name: &'life1 str,
job: JobData,
) -> Pin<Box<dyn Future<Output = RedisResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn move_to_failed<'life0, 'life1, 'async_trait>(
&'life0 mut self,
queue_name: &'life1 str,
job: JobData,
) -> Pin<Box<dyn Future<Output = RedisResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn log_job_status<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
queue_name: &'life1 str,
job: &'life2 JobData,
status: &'life3 str,
) -> Pin<Box<dyn Future<Output = RedisResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn log_job_status<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
queue_name: &'life1 str,
job: &'life2 JobData,
status: &'life3 str,
) -> Pin<Box<dyn Future<Output = RedisResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Source§fn update_job_progress<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
queue_name: &'life1 str,
job_id: &'life2 str,
progress: u32,
) -> Pin<Box<dyn Future<Output = RedisResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn update_job_progress<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
queue_name: &'life1 str,
job_id: &'life2 str,
progress: u32,
) -> Pin<Box<dyn Future<Output = RedisResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Auto Trait Implementations§
impl Freeze for QueueService
impl !RefUnwindSafe for QueueService
impl Send for QueueService
impl Sync for QueueService
impl Unpin for QueueService
impl !UnwindSafe for QueueService
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