Skip to main content

Agent

Agent starts :pypi:cell actors.

Attributes​

AttributeTypeDescription
conditionalboolean = TrueFlag indicating that the step is only started if the enabled condition is met.
requirestuple = (Connection,)List of other bootsteps that must be started before this agent can run.
agent_clsclassThe specific actor class to be instantiated, retrieved from the application configuration.
enabledbooleanDetermines if the agent bootstep should be executed based on the worker_agent configuration setting.

Constructor​

Signature​

def Agent(
c: Any,
**kwargs: dict
)

Parameters​

NameTypeDescription
cAnyThe consumer or parent object context.
**kwargsdictAdditional keyword arguments passed to the parent class constructor.

Signature​

def Agent(
c: celery.worker.Consumer,
**kwargs: dict
) - > null

Parameters​

NameTypeDescription
ccelery.worker.ConsumerThe consumer instance this step belongs to
**kwargsdictAdditional keyword arguments passed to the parent StartStopStep constructor

Methods​


create()​

@classmethod
def create(
c: celery.worker.Consumer
) - > cell.Actor

Instantiates the agent class using the current connection and assigns it to the consumer.

Parameters​

NameTypeDescription
ccelery.worker.ConsumerThe consumer instance providing the connection and storage for the created agent

Returns​

TypeDescription
cell.ActorThe instantiated agent actor instance