Crate tourniquet_celery
source ·Expand description
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");
Structs
- Ready to use connector for Celery.
- Wrapper for
CeleryError
that implementsNext
.
Traits
Type Definitions
- Shorthand type for a basic RoundRobin type using Celery