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

 ##########
 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:
   Throwing an exception here is heavier weight than we need. Just call on_fail 
here

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