Skip to main content

Beat

Step used to embed a beat process.

Enabled when the beat argument is set.

Attributes​

AttributeTypeDescription
labelstring = BeatInternal identifier used for logging and identifying the bootstep in the graph.
conditionalboolean = trueFlag indicating that the step is only enabled if the specific condition defined in the constructor is met.

Constructor​

Signature​

def Beat(
w: Any,
beat: boolean = False,
**kwargs: dict
)

Parameters​

NameTypeDescription
wAnyThe worker instance.
beatboolean = FalseFlag to enable the beat process.
**kwargsdictAdditional keyword arguments passed to the parent class.

Signature​

def Beat(
w: celery.worker.Worker,
beat: boolean = False,
**kwargs: dict
) - > null

Parameters​

NameTypeDescription
wcelery.worker.WorkerThe worker instance this bootstep is being attached to.
beatboolean = FalseFlag indicating whether the embedded beat service should be started alongside the worker.
**kwargsdictAdditional keyword arguments passed to the parent StartStopStep class.

Methods​


create()​

@classmethod
def create(
w: celery.worker.Worker
) - > celery.beat.EmbeddedService

Creates and returns an EmbeddedService instance for the beat process, provided the worker is not using an incompatible pool type like gevent or eventlet.

Parameters​

NameTypeDescription
wcelery.worker.WorkerThe worker instance providing configuration for the scheduler class and schedule filename.

Returns​

TypeDescription
celery.beat.EmbeddedServiceThe initialized embedded beat service instance attached to the worker.