Bird
0
0

You have a Celery task that calls another Celery task asynchronously inside it. What happens to the inner task when the outer task is called with delay()?

hard📝 Application Q9 of 15
Django - Celery and Background Tasks
You have a Celery task that calls another Celery task asynchronously inside it. What happens to the inner task when the outer task is called with delay()?
AThe outer task queues the inner task asynchronously, both run independently
BThe inner task runs synchronously inside the outer task
CThe inner task is ignored and never runs
DThe outer task waits for the inner task to finish before completing
Step-by-Step Solution
Solution:
  1. Step 1: Understand nested async task calls

    Calling delay() inside a task queues the inner task asynchronously, separate from the outer task.
  2. Step 2: Confirm independence of tasks

    Both tasks run independently; the outer task does not wait for the inner task to finish.
  3. Final Answer:

    The outer task queues the inner task asynchronously, both run independently -> Option A
  4. Quick Check:

    Nested delay() calls queue independent tasks [OK]
Quick Trick: delay() inside tasks queues new async tasks independently [OK]
Common Mistakes:
MISTAKES
  • Assuming inner task runs synchronously
  • Thinking outer task waits for inner task
  • Believing inner task is ignored

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Django Quizzes