3 unstable releases
0.2.0 | May 10, 2023 |
---|---|
0.1.1 | Jan 5, 2022 |
0.1.0 | Jan 4, 2022 |
#1680 in Asynchronous
1,140 downloads per month
28KB
374 lines
tourniquet-celery
Tourniquet integration with the celery library.
Example
#
#[celery::task]
async fn do_work(work: String) -> TaskResult<()> {
// Some work
Ok(())
}
let rr = RoundRobin::new(
vec!["amqp://rabbit01:5672/".to_owned(), "amqp://rabbit02:5672".to_owned()],
CeleryConnector { name: "rr", routes: &[("*", "my_route")], ..Default::default() },
);
rr.send_task(|| do_work::new(work.clone())).await.expect("Failed to send task");
License: MIT
lib.rs
:
Tourniquet integration with the celery library.
Example
#
#[celery::task]
async fn do_work(work: String) -> TaskResult<()> {
// Some work
Ok(())
}
let rr = RoundRobin::new(
vec!["amqp://rabbit01:5672/".to_owned(), "amqp://rabbit02:5672".to_owned()],
CeleryConnector { name: "rr", routes: &[("*", "my_route")], ..Default::default() },
);
rr.send_task(|| do_work::new(work.clone())).await.expect("Failed to send task");
Dependencies
~18–32MB
~478K SLoC