Flask - Background Tasks
How can you define a Celery task that retries automatically on failure up to 3 times with a 5-second delay between tries?
bind=True to access task instanceself.retry() inside the task.max_retries=3 in decorator and call self.retry(countdown=5) on exceptions to retry with delay.@celery_app.task(bind=True, max_retries=3) and call self.retry(countdown=5) inside the task on exception. -> Option Dself.retry() for retries [OK]bind=True and self.retry() for retries [OK]15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions