1

I have a DAG configured like this:

AIRFLOW_DEFAULT_ARGS = {
    'owner': 'airflow',
    'depends_on_past': False,
    'email_on_failure': False,
    'email_on_retry': False,
    'retries': 1,
    'retry_delay': timedelta(minutes=5),
    'dagrun_timeout': timedelta(hours=5)
}
DAILY_RUNNER = DAG(
            'daily_runner',
            max_active_runs=1,
            start_date=datetime(2019, 1, 1),
            schedule_interval="0 17 * * *",
            default_args=AIRFLOW_DEFAULT_ARGS)

My current understanding is that retries says that a task will be retried once before failing for good. Is there a way to set a similar limit for the number of times a DAG gets retried? If I have a dag in the running state, I want to be able to set it to failed from within the UI once and have it stop rerunning.

Preethi Vaidyanathan
  • 1,203
  • 1
  • 12
  • 32

1 Answers1

0

Currently, there is no way to set retry at dag level.

Please refer the below answer for retrying a set of tasks/whole-dag in case of failures.

Can a failed Airflow DAG Task Retry with changed parameter

Sathish
  • 332
  • 4
  • 11