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.
   
   (May not be relevant as we can possibly remove this addition entirely)

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to