From dda8f4356525041c5200c42d00e5dc05fd79c54b Mon Sep 17 00:00:00 2001 From: SeonghwanLee <50520567+uplsh580@users.noreply.github.com> Date: Thu, 27 Jan 2022 14:36:24 +0900 Subject: [PATCH] Fix 'airflow dags backfill --reset-dagruns' errors when run twice (#21062) Co-authored-by: uplsh (cherry picked from commit d97e2bac854f9891eb47f0c06c261e89723038ca) --- airflow/cli/commands/dag_command.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/airflow/cli/commands/dag_command.py b/airflow/cli/commands/dag_command.py index e04bc7381a2f0..6e8e157e01922 100644 --- a/airflow/cli/commands/dag_command.py +++ b/airflow/cli/commands/dag_command.py @@ -47,7 +47,7 @@ ) from airflow.utils.dot_renderer import render_dag from airflow.utils.session import create_session, provide_session -from airflow.utils.state import State +from airflow.utils.state import DagRunState @cli_utils.action_logging @@ -105,7 +105,7 @@ def dag_backfill(args, dag=None): end_date=args.end_date, confirm_prompt=not args.yes, include_subdags=True, - dag_run_state=State.NONE, + dag_run_state=DagRunState.QUEUED, ) try: