Skip to content

Commit

Permalink
Clear UPSTREAM_FAILED using the clean cli (apache#3886)
Browse files Browse the repository at this point in the history
* [AIRFLOW-1298] Fix 'clear only_failed'

* [AIRFLOW-1298] Fix 'clear only_failed'
  • Loading branch information
ubermen authored and Chris Fei committed Jan 23, 2019
1 parent 3d87232 commit 5dbda81
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion airflow/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -4070,7 +4070,9 @@ def clear(
if end_date:
tis = tis.filter(TI.execution_date <= end_date)
if only_failed:
tis = tis.filter(TI.state == State.FAILED)
tis = tis.filter(or_(
TI.state == State.FAILED,
TI.state == State.UPSTREAM_FAILED))
if only_running:
tis = tis.filter(TI.state == State.RUNNING)

Expand Down

0 comments on commit 5dbda81

Please sign in to comment.