Bird
0
0

Which of the following is the correct way to start a Celery worker in a Django project?

easy📝 Syntax Q3 of 15
Django - Celery and Background Tasks
Which of the following is the correct way to start a Celery worker in a Django project?
Adjango celery startworker
Bpython manage.py celery worker
Ccelery -A project_name worker --loglevel=info
Dcelery worker start project_name
Step-by-Step Solution
Solution:
  1. Step 1: Recall Celery worker start command

    The correct command uses 'celery -A' followed by the project name and 'worker'.
  2. Step 2: Check command syntax

    celery -A project_name worker --loglevel=info matches the correct syntax; others are invalid or incorrect.
  3. Final Answer:

    celery -A project_name worker --loglevel=info -> Option C
  4. Quick Check:

    Start Celery worker = celery -A project_name worker [OK]
Quick Trick: Use 'celery -A project_name worker' to start workers [OK]
Common Mistakes:
MISTAKES
  • Using manage.py to start Celery worker
  • Incorrect order of command arguments
  • Using django commands instead of celery CLI

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Django Quizzes