Skip to content

Commit

Permalink
Get rid of extra code from main
Browse files Browse the repository at this point in the history
  • Loading branch information
msumit authored and kaxil committed Jul 6, 2021
1 parent 2637d9a commit df1ff49
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 26 deletions.
25 changes: 0 additions & 25 deletions airflow/www/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1833,31 +1833,6 @@ def _mark_task_instance_state( # pylint: disable=too-many-arguments
session=session,
)

# Clear downstream tasks that are in failed/upstream_failed state to resume them.
# Flush the session so that the tasks marked success are reflected in the db.
session.flush()
subdag = dag.partial_subset(
task_ids_or_regex={task_id},
include_downstream=True,
include_upstream=False,
)

end_date = execution_date if not future else None
start_date = execution_date if not past else None

subdag.clear(
start_date=start_date,
end_date=end_date,
include_subdags=True,
include_parentdag=True,
only_failed=True,
session=session,
# Exclude the task itself from being cleared
exclude_task_ids={task_id},
)

session.commit()

flash(f"Marked {state} on {len(altered)} task instances")
return redirect(origin)

Expand Down
1 change: 0 additions & 1 deletion tests/www/views/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,4 +240,3 @@ def get_task_instance(session, task):
dagrun.refresh_from_db(session=session)
# dagrun should be set to RUNNING
assert dagrun.get_state() == State.RUNNING
>>>>>>> 7432c4d7e... Fix TI success/failure links (#16233)

0 comments on commit df1ff49

Please sign in to comment.