Skip to main content

DaemonOption

Common daemonization option

Constructor​

Signature​

def DaemonOption(
*args: tuple,
**kwargs: dict
)

Parameters​

NameTypeDescription
*argstupleVariable length argument list.
**kwargsdictArbitrary keyword arguments, including optional 'help_group' and 'callback'.

Signature​

def DaemonOption(
*args: any,
**kwargs: any
) - > null

Parameters​

NameTypeDescription
*argsanyPositional arguments passed to the parent CeleryOption constructor
**kwargsanyKeyword arguments including optional help_group and callback overrides

Methods​


daemon_setting()​

@classmethod
def daemon_setting(
ctx: [Context](../../app/task/context.md?sid=celery_app_task_context),
opt: [CeleryOption](celeryoption.md?sid=celery_bin_base_celeryoption),
value: Any
) - > Any

Try to fetch daemonization option from applications settings. Use the daemon command name as prefix (eg. worker - > worker_pidfile)

Parameters​

NameTypeDescription
ctx[Context](../../app/task/context.md?sid=celery_app_task_context)The Click context object containing the command name and application state
opt[CeleryOption](celeryoption.md?sid=celery_bin_base_celeryoption)The specific Celery option instance being processed
valueAnyThe current value of the option provided via command line or environment variables

Returns​

TypeDescription
AnyThe configuration value retrieved from the application settings or the provided default value