pub trait HeartBeat {
    // Required methods
    fn heart_beat<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn interval(&self) -> Duration;
}
Expand description

A worker can have heartbeats to keep alive or enqueue new jobs

Required Methods§

source

fn heart_beat<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

The future of a single beat

source

fn interval(&self) -> Duration

The interval for each beat to be called

Implementors§