You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ep...@apache.org on 2022/08/15 18:45:12 UTC
[airflow] 36/45: Remove useless logging line (#25347)
This is an automated email from the ASF dual-hosted git repository.
ephraimanierobi pushed a commit to branch v2-3-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
commit aff5994e2bd30d5288adb7489ab734c2f6583757
Author: Jorrick Sleijster <jo...@gmail.com>
AuthorDate: Thu Jul 28 01:28:22 2022 +0200
Remove useless logging line (#25347)
(cherry picked from commit 5efe6f34fd4a00f388d2979a708c90884f2e09ac)
---
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 0e7d4e1374..1b746e8a06 100644
--- a/airflow/models/dagrun.py
+++ b/airflow/models/dagrun.py
@@ -647,9 +647,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