Struct disque::JobQueryBuilder
[−]
[src]
pub struct JobQueryBuilder<'a> { /* fields omitted */ }
Helper to get a list of jobs
Examples
let disque = Disque::open("redis://127.0.0.1:7711/").unwrap(); let jobs = JobQueryBuilder::new().queue(b"my queue").state("queued") .iter_ids(&disque).unwrap().collect::<Vec<_>>(); assert!(jobs.len() >= 0);
Methods
impl<'a> JobQueryBuilder<'a>
[src]
fn new() -> JobQueryBuilder<'a>
fn count(&mut self, count: u64) -> &mut Self
A hint about how much work to do per iteration.
fn busyloop(&mut self, busyloop: bool) -> &mut Self
Block and return all the elements in a busy loop.
fn queue(&mut self, queue: &'a [u8]) -> &mut Self
Only get jobs in the specified queue.
fn state(&mut self, state: &'a str) -> &mut Self
Only return jobs in specified states. Can be called multiple times to get jobs in any of those states.
fn iter_ids<'b>(&'b self, disque: &'b Disque) -> RedisResult<Iter<String>>
Gets a job ids iterator.
fn iter_all<'b>(
&'b self,
disque: &'b Disque
) -> RedisResult<Iter<HashMap<String, Value>>>
&'b self,
disque: &'b Disque
) -> RedisResult<Iter<HashMap<String, Value>>>
Gets a job information iterator.