Skip to content

Commit

Permalink
Log exception in local executor (#21667)
Browse files Browse the repository at this point in the history
(cherry picked from commit a0fb0bb)
  • Loading branch information
uranusjr authored and ephraimbuddy committed Mar 26, 2022
1 parent ab2073e commit 2ac2bf2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions airflow/executors/local_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,12 @@ def _execute_work_in_fork(self, command: CommandType) -> str:
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):
Expand Down

0 comments on commit 2ac2bf2

Please sign in to comment.