[][src]Trait celery::Task

pub trait Task: Send + Sync + Serialize + for<'de> Deserialize<'de> {
    type Returns: Send + Sync + Debug;

    const NAME: &'static str;

    fn run<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = Result<Self::Returns, Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; fn arg_names() -> Vec<String> { ... }
fn on_failure<'life0, 'async_trait>(
        &'life0 mut self,
        err: Error
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
fn on_success<'life0, 'async_trait>(
        &'life0 mut self,
        returned: Self::Returns
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... }
fn timeout(&self) -> Option<usize> { ... }
fn max_retries(&self) -> Option<usize> { ... }
fn min_retry_delay(&self) -> usize { ... }
fn max_retry_delay(&self) -> usize { ... } }

A Task represents a unit of work that a Celery app can produce or consume.

Associated Types

Loading content...

Associated Constants

const NAME: &'static str

Loading content...

Required methods

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

Loading content...

Provided methods

fn arg_names() -> Vec<String>

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

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

fn timeout(&self) -> Option<usize>

fn max_retries(&self) -> Option<usize>

fn min_retry_delay(&self) -> usize

fn max_retry_delay(&self) -> usize

Loading content...

Implementors

Loading content...