-1

I'm currently working with Apache Airflow and trying to configure retries for my DAG tasks using the retry_delay (or retry_delay_sec) parameter in a YAML-based DAG definition. However, I'm running into issues when trying different formats. I've tried values such as:

  • Strings: "600", "600s"
  • Integers: 600, 60
  • Python timedelta: timedelta(minutes=10)

None of these seem to work properly, and I keep encountering errors. Could someone clarify the correct way to define retry_delay or retry_delay_sec in a YAML DAG configuration? Any help would be greatly appreciated!

I already explained in the body.

1

1 Answer 1

0

You should use 'retries' before using 'retry_delay'. 'retries' indicates the number of retries to be performed when an error occurs in the dag, and 'retry_delay' indicates the time between retries.

'retries' = 5,
'retry_delay' = timedelta(minutes=5)

This means that in case of an error, 5 retries will be made at 5-minute intervals.

For more inf.

I hope it helped.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.