pub trait JobHandle: Send + Sync + 'static {
type Err: Debug;
fn ack_job<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn nack_job<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
}Expand description
A trait to manager job timeouts and (n)acks
Required Associated Types
Required Methods
sourcefn ack_job<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn ack_job<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Ack the job referred by this JobHandle
sourcefn nack_job<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn nack_job<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
N-ack the job referred by this JobHandle, this must trigger a requeue if the
amount of tries has not exceeded the maximum amount