CallableTask
Task interface.
Methods
delay()
@classmethod
def delay(
*args: tuple,
**kwargs: dict
) - > Any
Dispatches the task for asynchronous execution using a simplified calling syntax.
Parameters
| Name | Type | Description |
|---|---|---|
| *args | tuple | Positional arguments to be passed to the task function. |
| **kwargs | dict | Keyword arguments to be passed to the task function. |
Returns
| Type | Description |
|---|---|
Any | A result object representing the pending task execution. |
apply_async()
@classmethod
def apply_async(
*args: tuple,
**kwargs: dict
) - > Any
Dispatches the task for asynchronous execution with support for advanced execution options.
Parameters
| Name | Type | Description |
|---|---|---|
| *args | tuple | Positional arguments to be passed to the task function. |
| **kwargs | dict | Execution options such as countdown, eta, or queue routing. |
Returns
| Type | Description |
|---|---|
Any | A result object representing the pending task execution. |
apply()
@classmethod
def apply(
*args: tuple,
**kwargs: dict
) - > Any
Executes the task locally and synchronously in the current process.
Parameters
| Name | Type | Description |
|---|---|---|
| *args | tuple | Positional arguments to be passed to the task function. |
| **kwargs | dict | Keyword arguments to be passed to the task function. |
Returns
| Type | Description |
|---|---|
Any | The direct result of the task function execution. |