bullrs 0.0.3

A BullMQ compatible Job Queue based on Redis
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use redis::AsyncCommands;

use crate::{error::BasicRedisError, queue::Queue};

impl<D, R: std::fmt::Debug + Clone> Queue<D, R> {
    /// Read the global concurrency limit stored in the queue's metadata.
    pub async fn get_global_concurrency(&mut self) -> Result<Option<usize>, BasicRedisError> {
        Ok(self
            .pool
            .get()
            .await?
            .hget(self.name.meta(), "concurrency")
            .await?)
    }
}