You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by bo...@apache.org on 2017/12/22 12:50:38 UTC
incubator-airflow git commit: [AIRFLOW-1948] Include details for
on_kill failure
Repository: incubator-airflow
Updated Branches:
refs/heads/master a5ca8cdce -> 5774796f4
[AIRFLOW-1948] Include details for on_kill failure
Remove the bare exception and propagate error
information to the log.
Closes #2897 from wrp/onkill
Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/5774796f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/5774796f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/5774796f
Branch: refs/heads/master
Commit: 5774796f46b097d138c85d726850e50ff9c5e2f6
Parents: a5ca8cd
Author: William Pursell <wi...@wepay.com>
Authored: Fri Dec 22 13:50:30 2017 +0100
Committer: Bolke de Bruin <bo...@xs4all.nl>
Committed: Fri Dec 22 13:50:30 2017 +0100
----------------------------------------------------------------------
airflow/jobs.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/5774796f/airflow/jobs.py
----------------------------------------------------------------------
diff --git a/airflow/jobs.py b/airflow/jobs.py
index ec95c3c..e1ff035 100644
--- a/airflow/jobs.py
+++ b/airflow/jobs.py
@@ -119,8 +119,8 @@ class BaseJob(Base, LoggingMixin):
job.end_date = timezone.utcnow()
try:
self.on_kill()
- except:
- self.log.error('on_kill() method failed')
+ except Exception as e:
+ self.log.error('on_kill() method failed: {}'.format(e))
session.merge(job)
session.commit()
raise AirflowException("Job shut down externally.")