Bird
0
0

Given the code:

medium📝 Predict Output Q4 of 15
Django - Celery and Background Tasks
Given the code:
result = AsyncResult('task123')
print(result.status)

What will be printed if the task is still waiting to start?
APENDING
BSTARTED
CSUCCESS
DFAILURE
Step-by-Step Solution
Solution:
  1. Step 1: Understand AsyncResult status values

    When a task has not started, its status is 'PENDING'.
  2. Step 2: Match status to output

    Since the task is waiting, result.status returns 'PENDING'.
  3. Final Answer:

    PENDING -> Option A
  4. Quick Check:

    Waiting task status = PENDING [OK]
Quick Trick: Pending means task not started yet [OK]
Common Mistakes:
MISTAKES
  • Confusing STARTED with PENDING
  • Assuming SUCCESS before task runs
  • Thinking FAILURE means waiting

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Django Quizzes