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§
- Celery
Connector - Ready to use connector for Celery.
- RRCelery
Error - Wrapper for
CeleryErrorthat implementsNext.
Traits§
Type Aliases§
- Celery
Round Robin - Shorthand type for a basic RoundRobin type using Celery