Bird
0
0

What will happen if a Celery task with retry raises an exception but the max_retries limit is reached?

medium📝 component behavior Q5 of 15
Django - Celery and Background Tasks
What will happen if a Celery task with retry raises an exception but the max_retries limit is reached?
AThe task will continue retrying indefinitely.
BThe task will silently succeed without retrying.
CThe task will fail and the exception will be logged.
DThe task will reset retries and start over.
Step-by-Step Solution
Solution:
  1. Step 1: Understand max_retries effect

    When max_retries is reached, Celery stops retrying the task.
  2. Step 2: Check what happens on retry limit reached

    The task fails and the exception is logged for debugging.
  3. Final Answer:

    The task will fail and the exception will be logged. -> Option C
  4. Quick Check:

    max_retries reached = task fails [OK]
Quick Trick: max_retries reached means task failure logged [OK]
Common Mistakes:
MISTAKES
  • Thinking retries reset automatically
  • Assuming silent success after retries
  • Believing retries continue forever

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Django Quizzes