django_prodserver.backends.workers package

Submodules

django_prodserver.backends.workers.celery module

class django_prodserver.backends.workers.celery.CeleryBeat(**server_config: Any)[source]

Bases: CeleryWorker

Backend to start a celery beat process.

start_server(*args: str) None[source]

Start Celery beat via the beat subcommand on the Celery app.

class django_prodserver.backends.workers.celery.CeleryWorker(**server_config: Any)[source]

Bases: BaseWorkerBackend

Backend to start a celery worker.

start_server(*args: str) None[source]

Start Celery Worker via the worker subcommand on the Celery app.

django_prodserver.backends.workers.django_q2 module

class django_prodserver.backends.workers.django_q2.DjangoQ2Worker(**server_args: Any)[source]

Bases: BaseWorkerBackend

Backend to start a Django-Q2 task queue worker.

prep_server_args() list[str][source]

Prepare arguments for qcluster command.

Returns:

List of formatted command line arguments for qcluster.

Note:

Most Django-Q2 configuration should be done through the Q_CLUSTER setting in Django settings. The ARGS configuration in PRODUCTION_PROCESSES is primarily for runtime options like verbosity and cluster naming.

start_server(*args: str) None[source]

Start Django-Q2 cluster using qcluster management command.

Args:
*args: Command line arguments to pass to the qcluster command.

Common arguments include: - –verbosity: Control logging verbosity (0-3) - –cluster-name: Specify cluster name - –settings: Override Django settings module

django_prodserver.backends.workers.django_tasks module

class django_prodserver.backends.workers.django_tasks.DjangoTasksWorker(**server_args: Any)[source]

Bases: BaseWorkerBackend

Backend to start a django task db worker.

start_server(*args: str) None[source]

Call django-tasks management command.