This document describes Celery 2.4. For development docs, go here.
celery.loaders.base¶
celery.loaders.base¶
Loader base class.
| copyright: |
|
|---|---|
| license: | BSD, see LICENSE for more details. |
-
class
celery.loaders.base.BaseLoader(app=None, **kwargs)¶ The 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 modules are imported to find tasks?
-
builtin_modules= frozenset(['celery.task'])¶
-
cmdline_config_parser(args, namespace='celery', re_type=<_sre.SRE_Pattern object>, extra_types={'json': <function loads at 0x7fb4ee89a848>}, override_types={'dict': 'json', 'list': 'json', 'tuple': 'json'})¶
-
conf¶ Loader configuration.
-
config_from_envvar(variable_name, silent=False)¶
-
config_from_object(obj, silent=False)¶
-
configured= False¶
-
error_envvar_not_set= 'The environment variable %r is not set,\nand as such the configuration could not be loaded.\nPlease set this variable and make it point to\na configuration 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()¶
-
mail¶
-
mail_admins(subject, body, fail_silently=False, sender=None, to=None, host=None, port=None, user=None, password=None, timeout=None, use_ssl=False, use_tls=False)¶
-
on_process_cleanup()¶ This method is called after a task is executed.
-
on_task_init(task_id, task)¶ This method is called before a task is executed.
-
on_worker_init()¶ This method is called when the worker (celeryd) starts.
-
on_worker_process_init()¶ This method is called when a child process starts.
-
override_backends= {}¶
-
worker_initialized= False¶