This document describes an older version of Celery (2.1). For the latest stable version please go here.

Loader Base Classes - celery.loaders.base

class celery.loaders.base.BaseLoader

The base class for loaders.

Loaders handles to following things:

  • 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?


Loader configuration.

configured = False
import_from_cwd(module, imp=None)

Import module, but make sure it finds modules located in the current directory.

Modules located in the current directory has precedence over modules located in sys.path.

mail_admins(subject, body, fail_silently=False)

This method is called after a task is executed.

on_task_init(task_id, task)

This method is called before a task is executed.


This method is called when the worker (celeryd) starts.

override_backends = {}
worker_initialized = False

Previous topic

Loaders - celery.loaders

Next topic

Default Loader - celery.loaders.default

This Page