Implements components and boot-steps.
This file was copied and adapted from celery.
copyright: |
|
---|---|
license: | BSD, see LICENSE for more details. |
Bases: thriftpool.components.base.NewBase
A component.
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.
This provides the default for include_if().
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 last 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.
Bases: thriftpool.utils.mixin.LogsMixin
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.
Parameters: |
|
---|
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.
Subclasses can override this to return a list of modules to import before components are claimed.
Execute external commands by this worker.
Bases: thriftpool.utils.mixin.LogsMixin, thriftworker.utils.mixin.LoopMixin
Execute commands provided through pipe.
Contains component that hold listener pool.
Bases: thriftpool.components.base.StartStopComponent
Manage process pool.
Bases: gaffer.http.util.CorsHandler
Bases: thriftpool.utils.mixin.LogsMixin, thriftworker.utils.mixin.LoopMixin
Start and manage workers.
Bases: thriftpool.components.base.StartStopComponent
Bases: object
Try to write to stream asynchronous.