Horse should exit with return code 1 if it raises an exception

main
Selwin Ong 6 years ago
parent 4759c43067
commit 25f2b75b1f

@ -675,10 +675,13 @@ class Worker(object):
self._is_horse = True self._is_horse = True
self.log = logger self.log = logger
self.perform_job(job, queue) self.perform_job(job, queue)
finally: except: # noqa
# os._exit() is the way to exit from childs after a fork(), in # Horse does not terminate properly
# constrast to the regular sys.exit() os._exit(1)
os._exit(0)
# os._exit() is the way to exit from childs after a fork(), in
# constrast to the regular sys.exit()
os._exit(0)
def setup_work_horse_signals(self): def setup_work_horse_signals(self):
"""Setup signal handing for the newly spawned work horse.""" """Setup signal handing for the newly spawned work horse."""

Loading…
Cancel
Save