3 releases
0.1.2 | Feb 14, 2025 |
---|---|
0.1.1 | Feb 14, 2025 |
0.1.0 | Feb 14, 2025 |
#1785 in Database interfaces
353 downloads per month
6KB
73 lines
BisonMQ
A Lightweight and Simple Rust Library for Job Queue
The gist
installation
cargo add bisonmq
Push a job to the queue
let job_queue: JobQueue = JobQueue::new("redis://127.0.0.1/", queue_key)?;
// return the length of the queue
let len: i64 = job_queue.push_job(&queue_value)?;
Pop a job from the queue
let job_queue: JobQueue = JobQueue::new("redis://127.0.0.1/", queue_key)?;
// 0.0 means waiting forever
let result: (String, String) = job_queue.pop_job(0.0);
Dependencies
~5.5MB
~104K SLoC