How opula1234/celery_redis_fastapi_demo works
Celery Demo exposes a FastAPI workflow for starting report generation and polling its status. The create route dispatches a Celery task and returns its task ID; a worker runs the task and returns a simulated report result, while the status route reads task state and any completed result from Redis. The README also documents Flower as a task monitor. The worker-to-broker consumption and Flower’s connection to the task system are not shown in the sampled source, so those links are marked unverified.
Main entry points: main.py Report API · tasks.py Report Task · compose.yaml Flower Monitor
Components 6
HTTP API
- Report API
src/celery_demo/main.py
Task Processing
- Report Task
src/celery_demo/tasks.py
Runtime Services
- Celery Queue
- Redis
- Flower Monitor
compose.yaml
Other components
- API Client
Connections 10
- API Client → Report API: requests reports
README.md - Report API → Report Task: dispatches task
src/celery_demo/main.py - Report API → API Client: returns task ID
src/celery_demo/main.py - Report API → Celery Queue: enqueues task
README.md - Celery Queue → Report Task: dispatches task
- Report Task → Redis: stores result
README.md - Report API → Redis: reads task status
src/celery_demo/main.py - API Client → Report API: polls status
README.md - API Client → Flower Monitor: views tasks
README.md - Flower Monitor → Celery Queue: monitors tasks