bullrs 0.0.2

A BullMQ compatible Job Queue based on Redis
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use deadpool_redis::PoolError;
use redis::RedisError;
use thiserror::Error;

#[derive(Error, Debug)]
pub enum WorkerError {
    #[error("something happened on the Redis protocol side: {0}")]
    Redis(#[from] RedisError),
    #[error("worker terminated due to failure; check if error was previously emitted")]
    AlreadyTerminated,
    /// The redis connection pool was closed from the outside of the worker.
    /// This is bad, because jobs keep a reference to the worker as well
    /// and can't store their results like they could in graceful termination.
    #[error("redis connection pool was closed")]
    PoolClosed,
    #[error("Some other pool error happened: {0}")]
    PoolError(#[from] PoolError),
}