How ang09356684/celery-demo works
Project type and purpose
• This is a minimal Celery demo project. Its sole purpose is to show how to define asynchronous tasks (in tasks.py), how to start a Celery worker bound to a Redis broker, and how to trigger tasks via simple Python scripts. There is no frontend or persistent database—just task producers, a message broker, and a worker consumer.
File structure
• Pipfile / Pipfile.lock: manage Python dependencies (celery, redis).
• tasks.py: defines a Celery application instance and one or more @app.task functions.
• trigger_add_tasks.py and trigger_divide_by_zero.py: simple clients that call tasks.delay() to enqueue work.
• No additional directories—everything lives at the top level, reflecting the demo’s simplicity.
README for additional insights
• It instructs installing and running Redis locally as the broker.
• It shows two terminals: one to launch a Celery worker with a specific queue (“demo”) and another to run a trigger script that enqueues a task.
• There is no explicit result backend configured, so results either go to the default (in-memory) or are simply printed in the worker logs.