Skip to main content

Celery

Skill Verified Active

Distributed task queue system for Python enabling asynchronous execution of background jobs, scheduled tasks, and workflows across multiple workers with Django, Flask, and FastAPI integration.

Purpose

To serve as a definitive guide for implementing and managing distributed task queues in Python applications using Celery.

Features

  • Distributed task execution and scheduling
  • Asynchronous background job processing
  • Complex task workflows and orchestration
  • Robust error handling with retries and backoff
  • Integration with Python web frameworks (Django, Flask, FastAPI)

Use Cases

  • Offloading long-running operations like email sending or report generation
  • Implementing scheduled tasks similar to cron jobs
  • Distributing computation across multiple worker nodes
  • Building complex asynchronous workflows with task dependencies

Non-Goals

  • Replacing simple asyncio for in-process async I/O
  • Providing real-time request/response handling
  • Serving as a solution for minimal infrastructure needs

Workflow

  1. Install Celery and necessary dependencies.
  2. Configure the Celery application, including broker and backend.
  3. Define tasks using decorators or Task classes.
  4. Execute tasks asynchronously using `.delay()` or `.apply_async()`.
  5. Monitor task execution via workers, Flower, or inspection commands.
  6. Implement advanced features like periodic tasks, workflows, and error handling.

Practices

  • Task design
  • Error handling
  • Performance optimization
  • Monitoring
  • Security

Prerequisites

  • Python environment
  • Celery package (`pip install celery`)
  • A message broker (e.g., Redis, RabbitMQ)
  • An optional result backend (e.g., Redis, database)

Installation

npx skills add bobmatnyc/claude-mpm-skills

Runs the Vercel skills CLI (skills.sh) via npx — needs Node.js locally and at least one installed skills-compatible agent (Claude Code, Cursor, Codex, …). Assumes the repo follows the agentskills.io format.

Quality Score

Verified
98 /100
Analyzed about 22 hours ago

Trust Signals

Last commit29 days ago
Stars44
LicenseMIT
Status
View Source

© 2025 SkillRepo · Find the right skill, skip the noise.