Skip to main content

CronCallback

Type Alias CronCallback 

Source
pub type CronCallback = Arc<dyn Fn(CronFire) -> Pin<Box<dyn Future<Output = Result<(), CamelError>> + Send>> + Send + Sync>;
Expand description

Async, fallible callback invoked on each cron fire.

The CronConsumer builds this from its ConsumerContext to submit an Exchange to the pipeline. Returning Err propagates the failure through CronService::run -> Consumer::start to Route supervision (ADR-0007).

Aliased Typeยง

pub struct CronCallback { /* private fields */ }