3 releases

0.1.2 May 12, 2024
0.1.1 May 31, 2023
0.1.0 Jan 16, 2023

#638 in Database interfaces

Download history 8/week @ 2024-09-19 5/week @ 2024-09-26 3/week @ 2024-10-03

145 downloads per month

MIT license

11KB
173 lines

redeez


A simplified general-purpose queueing system for Rust apps.

Example

// Create a new Redeez object, and define your queues
let mut queues = Redeez::new(redis)
        .queue("avatars:resize", |job| -> Result<()> {
            // -- snip --

            Ok(())
        })
        .queue("images:resize", resize_images);

// Start queue workers in the background
queues.listen();

// Dispatch some jobs into the queue
queues.dispatch("images:resize", json!(["image1.jpg", "image2.jpg"]));
queues.dispatch("avatars:resize", json!(["avatar1.jpg", "avatar2.jpg"]));

// When shutting your program down, stop listening for jobs
queues.shutdown();

Acknowledgements

This project is very heavily inspired by v3xlabs' redeez npm package. Extra thanks to @lucemans for helping me understand Redis.

License

Redeez is released under the MIT License. See the LICENSE file for details.

Dependencies

~6–16MB
~192K SLoC