Skip to content
Back to skills

Django Celery

ASecurity

Django + Celery async task patterns — configuration, task design, beat scheduling, retries, canvas workflows, monitoring, and testing. Use when adding background jobs, scheduled tasks, or async processing to a Django app.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 19, 2026
ai-agentspythongonodedjangotestingdebuggingapi

Works with

  • api

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned September 19, 2026

npx -y skills add majinmagros/magros.ai-skills --skill django-celery --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Django Celery?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Django Celery
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majinmagros-django-celery/badge)](https://www.skillsdirectory.com/skills/majinmagros-django-celery)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: django-celery
description: Django + Celery async task patterns — configuration, task design, beat scheduling, retries, canvas workflows, monitoring, and testing. Use when adding background jobs, scheduled tasks, or async processing to a Django app.
metadata:
  origin: ECC
---

# Django + Celery Async Task Patterns

Background tasks with Celery + Redis/RabbitMQ: idempotent tasks, retries with backoff, beat scheduling, canvas workflows, dead-letter queue. Detalhes em `references/`.

## When to Activate

- Adding background jobs or async processing to a Django app
- Implementing periodic/scheduled tasks
- Offloading slow operations (email, PDF generation, API calls) from request cycle
- Setting up Celery Beat for cron-like scheduling
- Debugging task failures, retries, or queue backlogs
- Writing tests for Celery tasks

## Core Rules

Pass PKs, never ORM objects. Tasks idempotent with status guards. `ACKS_LATE` + prefetch 1. Beat on a single node only.

```python
@shared_task(name='notifications.send_welcome_email')
def send_welcome_email(user_id: int) -> None:
    from apps.users.models import User
    try:
        user = User.objects.get(pk=user_id)
    except User.DoesNotExist:
        return  # idempotent: nothing to do
    EmailService.send_welcome(user)
```

## References

- `references/setup.md` — install, `celery.py`, settings, worker commands
- `references/task-design.md` — basic/retryable/idempotent tasks, soft limits, calling
- `references/beat-canvas.md` — beat schedules, chain/group/chord, dead-letter queue
- `references/testing-monitoring.md` — eager tests, retry tests, Flower, anti-patterns

## Production Checklist

- [ ] `ACKS_LATE`, prefetch 1, soft + hard time limits set
- [ ] Separate queues per priority (`-Q default,high_priority`)
- [ ] Beat on single node; worker supervised (systemd/supervisord)
- [ ] `task_failure` → Sentry; Flower for queue visibility
- [ ] Tests: eager mode + missing-object + retry cases

## Related Skills

- `django-patterns` — ORM, service layer, and project structure
- `django-tdd` — Testing Django models, views, and services
- `python-testing` — pytest configuration and fixtures

Files in this skill

  • SKILL.md2.1 KB
  • references/beat-canvas.md3.1 KB
  • references/setup.md2.1 KB
  • references/task-design.md3.3 KB
  • references/testing-monitoring.md2.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…