WorkerKill
Kills a worker in different ways.
Attributes
| Attribute | Type | Description |
|---|---|---|
| Method | Enum | Enumeration of supported strategies for terminating a Celery worker process, including container-level kills and application-level shutdowns. |
Methods
kill_worker()
@classmethod
def kill_worker(
worker: CeleryTestWorker,
method: WorkerKill.Method
)
Kill a Celery worker.
Parameters
| Name | Type | Description |
|---|---|---|
| worker | CeleryTestWorker | The specific Celery worker instance to be terminated. |
| method | WorkerKill.Method | The termination strategy to use, such as sending signals (SIGTERM, SIGQUIT), using Docker kill, or issuing a Celery control shutdown command. |
Returns
| Type | Description |
|---|---|
| Nothing is returned; the method performs an in-place termination of the worker process or container. |