ashb commented on a change in pull request #4783: [AIRFLOW-578] Fix check
return code
URL: https://github.com/apache/airflow/pull/4783#discussion_r275405460
##########
File path: airflow/jobs.py
##########
@@ -2559,7 +2569,13 @@ def signal_handler(signum, frame):
while True:
# 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:
Rather than raising an exception here, to then get picked up by the
on_failure you added, could we instead just handle it directly 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