Recall & Review
beginner
What is Celery used for in a Django project?
Celery is used to run tasks asynchronously in the background, like sending emails or processing data, so the main app stays fast and responsive.
Click to reveal answer
beginner
Which command installs Celery in your Django project?
You install Celery using the command
pip install celery.Click to reveal answer
intermediate
What is the purpose of the
celery.py file in a Django project?The
celery.py file sets up the Celery app instance and configures it to work with your Django settings.Click to reveal answer
intermediate
Why do you need a message broker like Redis or RabbitMQ with Celery?
Celery uses a message broker to send and receive task messages between Django and worker processes that run tasks in the background.
Click to reveal answer
beginner
How do you start a Celery worker to process tasks?
You run the command
celery -A your_project_name worker --loglevel=info to start a worker that listens for tasks.Click to reveal answer
Which command installs Celery in a Django project?
✗ Incorrect
The correct command to install Celery is
pip install celery.What file usually contains the Celery app configuration in Django?
✗ Incorrect
The
celery.py file is where you configure the Celery app in a Django project.Which of these is a message broker commonly used with Celery?
✗ Incorrect
Redis is a popular message broker used to pass messages between Django and Celery workers.
What does the Celery worker do?
✗ Incorrect
The Celery worker listens for tasks and runs them asynchronously in the background.
How do you start a Celery worker for a project named 'myproject'?
✗ Incorrect
The command
celery -A myproject worker --loglevel=info starts the Celery worker.Explain the steps to install and set up Celery in a Django project.
Think about installation, configuration, broker setup, and running the worker.
You got /4 concepts.
Why is a message broker necessary for Celery, and what role does it play?
Consider how tasks get from your app to the background workers.
You got /3 concepts.