Download 2.4-archived PDF
Transcript
Celery Documentation, Release 2.4.7
10.18.1 celery.loaders.default
The default loader used when no custom app has been initialized.
copyright
3. 2009 - 2011 by Ask Solem.
license BSD, see LICENSE for more details.
class celery.loaders.default.Loader(app=None, **kwargs)
The loader used by the default app.
find_module(module)
on_worker_init()
Imports modules at worker init so tasks can be registered and used by the worked.
The list of modules to import is taken from the CELERY_IMPORTS setting.
read_configuration()
Read configuration from celeryconfig.py and configure celery and Django so it can be used by
regular Python.
setup_settings(settingsdict)
wanted_module_item(item)
10.19 celery.loaders.base
• celery.loaders.base
10.19.1 celery.loaders.base
Loader base class.
copyright
3. 2009 - 2011 by Ask Solem.
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 at
0x2eb3f08>, extra_types={‘json’: <function loads at 0x2f68230>},
override_types={‘dict’: ‘json’, ‘list’: ‘json’, ‘tuple’: ‘json’})
10.19. celery.loaders.base
257