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

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

@ -675,7 +675,10 @@ class Worker(object):
self._is_horse = True
self.log = logger
self.perform_job(job, queue)
finally:
except: # noqa
# Horse does not terminate properly
os._exit(1)
# os._exit() is the way to exit from childs after a fork(), in
# constrast to the regular sys.exit()
os._exit(0)

Loading…
Cancel
Save