Skip to main content

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

NameTypeDescription
*argstuplePositional arguments to be passed to the task function.
**kwargsdictKeyword arguments to be passed to the task function.

Returns

TypeDescription
AnyA 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

NameTypeDescription
*argstuplePositional arguments to be passed to the task function.
**kwargsdictExecution options such as countdown, eta, or queue routing.

Returns

TypeDescription
AnyA 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

NameTypeDescription
*argstuplePositional arguments to be passed to the task function.
**kwargsdictKeyword arguments to be passed to the task function.

Returns

TypeDescription
AnyThe direct result of the task function execution.