Skip to content

Commit

Permalink
Remove useless logging line (#25347)
Browse files Browse the repository at this point in the history
(cherry picked from commit 5efe6f3)
  • Loading branch information
Jorricks authored and ephraimbuddy committed Aug 15, 2022
1 parent 626814a commit aff5994
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions airflow/models/dagrun.py
Expand Up @@ -647,9 +647,10 @@ def _filter_tis_and_exclude_removed(dag: "DAG", tis: List[TI]) -> Iterable[TI]:
try:
ti.task = dag.get_task(ti.task_id)
except TaskNotFound:
self.log.error("Failed to get task for ti %s. Marking it as removed.", ti)
ti.state = State.REMOVED
session.flush()
if ti.state != State.REMOVED:
self.log.error("Failed to get task for ti %s. Marking it as removed.", ti)
ti.state = State.REMOVED
session.flush()
else:
yield ti

Expand Down

0 comments on commit aff5994

Please sign in to comment.