This document describes Celery 3.0. For development docs, go here.
The boot-step components.
The __init__() method is called when the component is bound to a parent object, and can as such be used to initialize attributes in the parent object at parent instantiation-time.
if set the component will not be registered, but can be used as a component base class.
Create the component.
An optional predicate that decided whether this component should be created.
This flag is reserved for the workers Consumer, since it is required to always be started last. There can only be one object marked with lsat in every namespace.
The name of the component, or the namespace and the name of the component separated by dot.
can be used to specify the namespace, if the name does not include it.
Optional obj created by the create() method. This is used by StartStopComponents to keep the original service object.
List of component names this component depends on. Note that the dependencies must be in the same namespace.
Metaclass for components.
A namespace containing components.
Every component must belong to a namespace.
When component classes are created they are added to the mapping of unclaimed components. The components will be claimed when the namespace they belong to is created.
Apply the components in this namespace to an object.
This will apply the __init__ and include methods of each components with the object as argument.
For StartStopComponents the services created will also be added the the objects components attribute.
Bind component to parent object and this namespace.
Will load the component modules this namespace depends on.
Subclasses can override this to return a list of modules to import before components are claimed.