You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2019/04/15 15:04:23 UTC

[GitHub] [airflow] ashb commented on a change in pull request #4783: [AIRFLOW-578] Fix check return code

ashb commented on a change in pull request #4783: [AIRFLOW-578] Fix check return code 
URL: https://github.com/apache/airflow/pull/4783#discussion_r275401938
 
 

 ##########
 File path: airflow/jobs.py
 ##########
 @@ -137,6 +137,13 @@ def on_kill(self):
         """
         pass
 
+    def on_failure(self, e):
+        """
+        Will be called when an exception happens during _execute
+        default just raise exception again
+        """
+        raise e
 
 Review comment:
   It is better for this to be
   ```suggestion
           raise
   ```
   
   That way it will preserve the original stack trace. With it as `raise e` it will appear to come from this line which will make it harder to debug/track down problems.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services