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/03/22 07:12:25 UTC
[airflow] 12/26: Log exception in local executor (#21667)
This is an automated email from the ASF dual-hosted git repository.
ephraimanierobi pushed a commit to branch v2-2-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
commit fcdb75932e52dcfb8ca55f2055f21f4c8769b4e0
Author: Tzu-ping Chung <tp...@astronomer.io>
AuthorDate: Mon Feb 21 05:05:01 2022 +0800
Log exception in local executor (#21667)
(cherry picked from commit a0fb0bbad312df06dd0a85453bd4f93ee2e01cbb)
---
airflow/executors/local_executor.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/airflow/executors/local_executor.py b/airflow/executors/local_executor.py
index 775b6ca..fc662fc 100644
--- a/airflow/executors/local_executor.py
+++ b/airflow/executors/local_executor.py
@@ -125,12 +125,12 @@ class LocalWorkerBase(Process, LoggingMixin):
ret = 0
return State.SUCCESS
except Exception as e:
- self.log.error("Failed to execute task %s.", str(e))
+ self.log.exception("Failed to execute task %s.", e)
+ return State.FAILED
finally:
Sentry.flush()
logging.shutdown()
os._exit(ret)
- raise RuntimeError('unreachable -- keep mypy happy')
@abstractmethod
def do_work(self):