What does this skill do?

The Django Celery Pro Skill provides production-ready patterns for background task processing in Django using Celery with Redis or RabbitMQ. It covers robust configuration, designing idempotent tasks, periodic scheduling with Beat, retries with exponential backoff, workflows with Canvas, and brokerless testing, helping you avoid the most common errors that lead to data loss or duplicate executions.

Download Slow Operations
Remove operations such as sending emails, generating PDFs, or making calls to external APIs from the HTTP cycle.
Recurring Tasks with Beat
Implement scheduling with crontab using the DatabaseScheduler from django-celery-beat.
Retry Attempts with Backoff
Configure automatic retries with exponential backoff and jitter for transient failures.
Canvas-Based Workflows
Chain tasks using `chain`, `group`, and `chord` for sequential and parallel pipelines.

Usage examples

📨 Idempotent task
Create an idempotent Celery task to send a welcome email that won't fail if the user doesn't exist.
🔄 Retry with backoff
Design a synchronization task with an external CRM that retries using exponential backoff in the event of transient failures.
⏰ Planning with Beat
Configure Celery Beat to clean up expired sessions at 2 a.m. and send a weekly digest on Mondays.
🧩 Workflow with Chord
Create a pipeline that processes chunks in parallel using Chord and aggregates the results at the end.

Features

Idempotent tasks Patterns that pass PKs instead of ORM instances, with state guards to prevent duplicate side effects.
Automatic retries Exponential backoff with jitter and a maximum limit; autoretry for ConnectionError and TimeoutError.
Planning with Beat DatabaseScheduler can be managed via code or through the Django admin, using crontab and intervals.
Canvas: chain, group, and chord Complex workflows with sequential and parallel execution and aggregation callbacks.
Testing without a broker CELERY_TASK_ALWAYS_EAGER and exception propagation for synchronous tests with pytest.

Frequently asked questions

Redis or RabbitMQ. The skill includes configuration for both, with JSON serialization and production settings such as ACKS_LATE and PREFETCH_MULTIPLIER=1.
Yes. A skill is a set of templates and code snippets that Claude applies to your Django project. It does not require a specific Claude plan.
Yes. You need celery, django-celery-results, and django-celery-beat. The skill includes the pip installation command in its instructions.
Yes. All the patterns are MIT-licensed and are designed as templates that can be adapted to the structure of your Django project.
Django Celery Pro — Asynchronous Tasks in Production with Claude AI

¿Prefieres escuchar el contenido? Genera la narración de audio con un clic.