djangoplay-web / Deployment / Celery — Background Workers
DocsDjangoPlay WebDeploymentCelery — Background Workers

Celery — Background Workers

Project: DjangoPlay Web Document Type: Deployment Documentation Last Updated: 2026-03-28 Version: 1.0

1 min readApplies to v1.2.2
On this page ▾
  1. 1. Overview
  2. 2. Celery Components
  3. 3. Starting Celery Worker
  4. 4. Starting Celery Beat
  5. 5. systemd Service Example
  6. 6. Logs

1. Overview

Celery is used for background job processing.

Celery handles:

  • Email sending
  • Notifications
  • Scheduled jobs
  • Report generation
  • Background processing
  • Data cleanup tasks

Celery uses Redis as the message broker.


2. Celery Components

Component Description
Celery Worker Executes background tasks
Celery Beat Scheduler for periodic tasks
Redis Message broker
Django Task producer

3. Starting Celery Worker

Example command:

bash
celery -A project worker -l info
`

4. Starting Celery Beat

bash
celery -A project beat -l info

5. systemd Service Example

Example Celery service:

plaintext
[Unit]
Description=Celery Worker
After=network.target

[Service]
User=www-data
Group=www-data
WorkingDirectory=/path/to/project/backend
EnvironmentFile=/path/to/environment/file
ExecStart=/path/to/venv/bin/celery -A project worker --loglevel=info
Restart=on-failure

[Install]
WantedBy=multi-user.target

6. Logs

Celery logs should be stored in log files and monitored regularly.