🗓️Task Retry
Also known as Retries, Retry Policy, Retry Delay
A failed task runs again on its own. It gets a set number of tries.
Think of it like
The ball missed the hoop, so you take another shot. After three misses, you ask for help.
Example
A load hits a timeout at 2 am because the database is busy. Five minutes later the retry works, and no one is woken up.
Why it matters
Most night-time failures are brief. Retries turn them into a short delay instead of a broken morning report.
Definition
Example code
python
@task(
retries=3,
retry_delay=timedelta(minutes=5),
retry_exponential_backoff=True,
)
def load_orders():
...Common mistake
Key takeaways
- 1Count. Set how many extra tries it gets.
- 2Wait. Leave a gap, often growing longer.
- 3Then alert. Tell a person after the last try.