celery.loaders.base
Loader base class.
- classcelery.loaders.base.BaseLoader(app, **kwargs)
-
Base class for loaders.
Loaders handles,
Reading celery client/worker configurations.
-
- What happens when a task starts?
-
See
on_task_init().
-
- What happens when the worker starts?
-
See
on_worker_init().
-
- What happens when the worker shuts down?
-
See
on_worker_shutdown().
What modules are imported to find tasks?
- autodiscover_tasks(packages, related_name='tasks')
- builtin_modules=frozenset({})
- cmdline_config_parser(args, namespace='celery', re_type=re.compile('\\((\\w+)\\)'), extra_types=None, override_types=None)
- propertyconf
-
Loader configuration.
- config_from_object(obj, silent=False)
- configured=False
- propertydefault_modules
- find_module(module)
- import_default_modules()
- import_from_cwd(module, imp=None, package=None)
- import_module(module, package=None)
- import_task_module(module)
- init_worker()
- init_worker_process()
- now(utc=True)
- on_process_cleanup()
-
Called after a task is executed.
- on_task_init(task_id, task)
-
Called before a task is executed.
- on_worker_init()
-
Called when the worker (celery worker) starts.
- on_worker_process_init()
-
Called when a child process starts.
- on_worker_shutdown()
-
Called when the worker (celery worker) shuts down.
- override_backends={}
- read_configuration(env='CELERY_CONFIG_MODULE')
- shutdown_worker()
- worker_initialized=False
Copyright © 2017-2026 Asif Saif Uddin, core team & contributors. All rights reserved.
Celery is licensed under The BSD License (3 Clause, also known as the new BSD license). The license is an OSI approved Open Source license and is GPL-compatible.
https://docs.celeryq.dev/en/stable/reference/celery.loaders.base.html