Struct rjq::Queue [] [src]

pub struct Queue { /* fields omitted */ }

Queue

Methods

impl Queue
[src]

Init new queue object

url - redis url to connect

name - queue name

Delete enqueued jobs

Enqueue new job

args - job arguments

expire - job expiration time in seconds, if hasn't started during this time it will be removed

Returns unique job identifier

Get job status

uuid - unique job identifier

Returns job status

Work on queue, process enqueued jobs

wait - time to wait in single iteration to pop next job, set 1-10 if not sure about that

fun - function that would work on jobs

timeout - timeout in seconds, if job hasn't been completed during this time, it will be marked as lost

freq - frequency of checking job status while counting on timeout, number of checks per second, recommended values from 1 to 50, if not sure set to 10

expire - job result expiration time in seconds

fall - if set to true then worker will panic if job was lost

infinite - if set to false then worker will process one job and quit

Get job result

uuid - unique job identifier

Returns job result