Skip to main content

gen_task_name

Generate task name from name/module pair.

def gen_task_name(
app: Celery,
name: string,
module_name: string
) - > string

Generate task name from name/module pair.

Parameters​

NameTypeDescription
appCeleryThe Celery application instance used to resolve the main module name configuration.
namestringThe base name of the task function or class.
module_namestringThe name of the module where the task is defined; defaults to "main" if not provided.

Returns​

TypeDescription
stringThe fully qualified task name, potentially rewritten to match the application's main module name if the task is defined in the entry point script.