What problem does it solve?
Creating new Celery tasks often leads to inconsistent patterns, circular imports, missing metrics/logging, and brittle error handling that breaks batch processing.
Core Features & Use Cases
- Determines the right task module and execution type: Guides you to parse task intent to choose the correct
app/tasks/{module}.py destination and whether the task should be scheduled (beat) or run on-demand.
- Implements a production-ready orchestration template: Establishes a standardized Celery task structure with
SessionLocal() lifecycle management, safe per-item exception handling, logging at start/end, and metrics via observe_job().
- Registers the task for discovery and optional beat scheduling: Ensures
celery_app.autodiscover_tasks(["app.tasks"]) discovery and documents how to add a beat schedule using scheduler configuration or Celery beat settings.
Quick Start
Ask to generate a Celery task for syncing subscribers named "sync_subscribers for Splynx reconciliation" that follows the repository’s existing app/tasks/subscribers.py pattern, includes correct DB session handling and per-item error resilience, and returns processing statistics.