You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by je...@apache.org on 2022/07/27 23:28:36 UTC
[airflow] branch main updated: Remove useless logging line (#25347)
This is an automated email from the ASF dual-hosted git repository.
jedcunningham pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 5efe6f34fd Remove useless logging line (#25347)
5efe6f34fd is described below
commit 5efe6f34fd4a00f388d2979a708c90884f2e09ac
Author: Jorrick Sleijster <jo...@gmail.com>
AuthorDate: Thu Jul 28 01:28:22 2022 +0200
Remove useless logging line (#25347)
---
airflow/models/dagrun.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/airflow/models/dagrun.py b/airflow/models/dagrun.py
index 64c27303a1..fde2aa7685 100644
--- a/airflow/models/dagrun.py
+++ b/airflow/models/dagrun.py
@@ -728,9 +728,10 @@ class DagRun(Base, LoggingMixin):
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