uranusjr commented on code in PR #22793:
URL: https://github.com/apache/airflow/pull/22793#discussion_r844221146
##########
airflow/cli/commands/dag_command.py:
##########
@@ -71,6 +72,22 @@ def dag_backfill(args, dag=None):
args.end_date = args.end_date or args.start_date
args.start_date = args.start_date or args.end_date
+ if args.reset_run_type:
+ with create_session() as session:
+ dagruns = DagRun.find(
+ dag_id=dag.get_dags_ids(),
+ execution_start_date=args.start_date,
+ execution_end_date=args.end_date,
+ run_type=DagRunType.BACKFILL_JOB,
+ )
+
+ for dr in dagruns:
+ if dr.state in [DagRunState.FAILED, DagRunState.SUCCESS]:
+ dr.reset_run_type()
+ session.commit()
Review Comment:
```suggestion
```
Not needed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]