0
0
Djangoframework~5 mins

Celery installation and setup in Django - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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?
Adjango-admin start celery
Bpip install celery
Cpip install django-celery
Dcelery install
What file usually contains the Celery app configuration in Django?
Amanage.py
Bsettings.py
Ctasks.py
Dcelery.py
Which of these is a message broker commonly used with Celery?
APostgreSQL
BSQLite
CRedis
DDjango ORM
What does the Celery worker do?
ARuns tasks in the background
BStarts the Django server
CManages database migrations
DCompiles static files
How do you start a Celery worker for a project named 'myproject'?
Acelery -A myproject worker --loglevel=info
Bpython manage.py celery worker
Ccelery start myproject
Ddjango-admin 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.