celery-patterns

Installation
SKILL.md

Celery Patterns for Django

Core Philosophy

  • Idempotent tasks: Running a task twice must produce the same result
  • Pass IDs, not objects: Arguments must be JSON-serializable
  • Always handle failures: Log errors, never swallow exceptions silently
  • Proper retry strategies: Use exponential backoff for external services

Task Design

Structure

  • Place tasks in apps/<app>/tasks.py
  • Use @shared_task for reusable tasks across projects
  • Use bind=True when needing access to task instance (retries, task ID, state updates)
  • Add type hints to task signatures
  • Log task start, completion, and failures
Installs
19
GitHub Stars
145
First Seen
Jan 23, 2026
celery-patterns — kjnez/claude-code-django