Struct disque::QueueQueryBuilder
[−]
[src]
pub struct QueueQueryBuilder { /* fields omitted */ }
Helper to get a list of queues
Examples
let disque = Disque::open("redis://127.0.0.1:7711/").unwrap(); let queues = QueueQueryBuilder::new().busyloop(true).minlen(50) .iter(&disque).unwrap().collect::<Vec<_>>(); assert!(queues.len() >= 0);
Methods
impl QueueQueryBuilder
[src]
fn new() -> QueueQueryBuilder
Creates a new builder.
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
If true, blocks and returns all the queues in a busy loop.
fn minlen(&mut self, minlen: u64) -> &mut Self
Only return queues with at least minlen
jobs.
fn maxlen(&mut self, maxlen: u64) -> &mut Self
Only return queues with at most maxlen
jobs.
fn importrate(&mut self, importrate: u64) -> &mut Self
Only return queues with a job import rate (from other nodes) greater
than or equal to importrate
.
fn iter<'a>(&'a self, disque: &'a Disque) -> RedisResult<Iter<Vec<u8>>>
Gets the queue iterator.