Beat
Step used to embed a beat process.
Enabled when the beat argument is set.
Attributes
| Attribute | Type | Description |
|---|---|---|
| label | string = Beat | Internal identifier used for logging and identifying the bootstep in the graph. |
| conditional | boolean = true | Flag 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
| Name | Type | Description |
|---|---|---|
| w | Any | The worker instance. |
| beat | boolean = False | Flag to enable the beat process. |
| **kwargs | dict | Additional keyword arguments passed to the parent class. |
Signature
def Beat(
w: celery.worker.Worker,
beat: boolean = False,
**kwargs: dict
) - > null
Parameters
| Name | Type | Description |
|---|---|---|
| w | celery.worker.Worker | The worker instance this bootstep is being attached to. |
| beat | boolean = False | Flag indicating whether the embedded beat service should be started alongside the worker. |
| **kwargs | dict | Additional 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
| Name | Type | Description |
|---|---|---|
| w | celery.worker.Worker | The worker instance providing configuration for the scheduler class and schedule filename. |
Returns
| Type | Description |
|---|---|
celery.beat.EmbeddedService | The initialized embedded beat service instance attached to the worker. |