tourniquet-celery
Tourniquet integration with the celery library.
Example
#
async
let rr = new;
rr.send_task.await.expect;
License: MIT
Tourniquet integration with the celery library.
#
#[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