[−][src]Struct celery::Celery
A Celery
app is used to produce or consume tasks asyncronously.
Fields
name: String
broker: B
default_queue_name: String
task_timeout: Option<usize>
task_max_retries: Option<usize>
task_min_retry_delay: Option<usize>
task_max_retry_delay: Option<usize>
Methods
impl<B> Celery<B> where
B: Broker + 'static,
[src]
B: Broker + 'static,
pub fn builder() -> CeleryBuilder
[src]
Get a CeleryBuilder
for creating a Celery
app with a custom configuration.
pub fn new(name: &str, broker: B) -> Self
[src]
Create a new Celery
app with the given name.
pub async fn send_task<'_, '_, T: Task>(
&'_ self,
task: T,
queue: &'_ str
) -> Result<(), Error>
[src]
&'_ self,
task: T,
queue: &'_ str
) -> Result<(), Error>
Send a task to a remote worker.
pub fn register_task<T: Task + 'static>(
&mut self,
name: &str
) -> Result<(), Error>
[src]
&mut self,
name: &str
) -> Result<(), Error>
Register a task.
pub async fn execute_task<'_, '_>(
&'_ self,
task_name: &'_ str,
data: Vec<u8>
) -> Result<(), Error>
[src]
&'_ self,
task_name: &'_ str,
data: Vec<u8>
) -> Result<(), Error>
pub async fn consume<'_, '_>(&'_ self, queue: &'_ str) -> Result<(), Error>
[src]
Consume tasks from the default queue.
Auto Trait Implementations
impl<B> !RefUnwindSafe for Celery<B>
impl<B> !Send for Celery<B>
impl<B> !Sync for Celery<B>
impl<B> Unpin for Celery<B> where
B: Unpin,
B: Unpin,
impl<B> !UnwindSafe for Celery<B>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,