lucafuji commented on a change in pull request #6870: [AIRFLOW-578] [WIP] Fix 
check return code
URL: https://github.com/apache/airflow/pull/6870#discussion_r360589111
 
 

 ##########
 File path: airflow/jobs/local_task_job.py
 ##########
 @@ -95,6 +95,10 @@ def signal_handler(signum, frame):
                 # Monitor the task to see if it's done
                 return_code = self.task_runner.return_code()
                 if return_code is not None:
+                    if return_code != 0:
+                        msg = ("LocalTaskJob process exited with non zero "
+                               "status {}".format(return_code))
+                        raise AirflowException(msg)
 
 Review comment:
   This PR is actually from previously a closed PR, in previous PR one of the 
reviewer recommend me to add an on_failure callback in base job. 
   Here is the comment
   https://github.com/apache/airflow/pull/1122#issuecomment-193252883.
   
   I'm fine with either way, please let me know you thoughts

----------------------------------------------------------------
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