Struct robin::connection::WorkerConnection
[−]
[src]
pub struct WorkerConnection { /* fields omitted */ }
The connection to Redis. Required to enqueue and dequeue jobs.
Each WorkerConnection
has exactly one actual Redis connection.
Methods
impl WorkerConnection
[src]
pub fn config(&self) -> &Config
[src]
Returns the connections config
pub fn enqueue_to(
&self,
iden: QueueIdentifier,
name: JobName,
args: &Args,
retry_count: RetryCount
) -> RobinResult<()>
[src]
&self,
iden: QueueIdentifier,
name: JobName,
args: &Args,
retry_count: RetryCount
) -> RobinResult<()>
Put a job into the queue.
This method will enqueue the job regardless of what the retry_count
is.
Not reenqueueing jobs that failed too much is handled at another level.
pub fn retry(
&self,
name: JobName,
args: &Args,
retry_count: RetryCount
) -> RobinResult<()>
[src]
&self,
name: JobName,
args: &Args,
retry_count: RetryCount
) -> RobinResult<()>
Put the job into the retry queue.
pub fn dequeue_from<'a>(
&'a self,
iden: QueueIdentifier,
timeout: DequeueTimeout
) -> Result<(Box<Job + Send>, String, RetryCount), NoJobDequeued>
[src]
&'a self,
iden: QueueIdentifier,
timeout: DequeueTimeout
) -> Result<(Box<Job + Send>, String, RetryCount), NoJobDequeued>
Pull the first job out of the queue.
pub fn delete_all(&self) -> RobinResult<()>
[src]
Delete all jobs from all queues
pub fn size(&self, iden: QueueIdentifier) -> RobinResult<usize>
[src]
The number of jobs in the queue
pub fn main_queue_size(&self) -> RobinResult<usize>
[src]
The number of jobs in the main queue
pub fn retry_queue_size(&self) -> RobinResult<usize>
[src]
The number of jobs in the retry queue
pub fn is_queue_empty(&self, iden: QueueIdentifier) -> RobinResult<bool>
[src]
true
if there are 0 jobs in the queue, false
otherwise