From 3e18aa2ddddf7d6648a89b745f3c4e4193a88b84 Mon Sep 17 00:00:00 2001 From: gopal Date: Tue, 26 Dec 2023 10:45:46 +0530 Subject: [PATCH] Remove getattr in es task handler when airflow min version bumped to 2.6 --- airflow/providers/elasticsearch/log/es_task_handler.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/airflow/providers/elasticsearch/log/es_task_handler.py b/airflow/providers/elasticsearch/log/es_task_handler.py index 227148e52b921..1320756a2c17e 100644 --- a/airflow/providers/elasticsearch/log/es_task_handler.py +++ b/airflow/providers/elasticsearch/log/es_task_handler.py @@ -462,8 +462,7 @@ def close(self) -> None: if self.closed: return - # todo: remove `getattr` when min airflow version >= 2.6 - if not self.mark_end_on_close or getattr(self, "ctx_task_deferred", None): + if not self.mark_end_on_close: # when we're closing due to task deferral, don't mark end of log self.closed = True return