Fix heroku worker (#993)

* Attempt to fix HerokuWorker test.

* Fixed test_shutdown_double_sigrtmin

* Another attempt to fix test

* Another attempt to fix test

* Another attempt to fix test

* When work horse runs into an exception, raise that exception before calling os._exit()
main
Selwin Ong 6 years ago committed by GitHub
parent 25f2b75b1f
commit e00ff97867
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -675,8 +675,9 @@ 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)
except: # noqa except Exception as e: # noqa
# Horse does not terminate properly # Horse does not terminate properly
raise e
os._exit(1) os._exit(1)
# os._exit() is the way to exit from childs after a fork(), in # os._exit() is the way to exit from childs after a fork(), in

Loading…
Cancel
Save