From e00ff978676ba45d1e96f0d44129ef543cc7a9d3 Mon Sep 17 00:00:00 2001 From: Selwin Ong Date: Sun, 23 Sep 2018 21:48:33 +0700 Subject: [PATCH] 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() --- rq/worker.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rq/worker.py b/rq/worker.py index d1531a3..4410ce6 100644 --- a/rq/worker.py +++ b/rq/worker.py @@ -675,8 +675,9 @@ class Worker(object): self._is_horse = True self.log = logger self.perform_job(job, queue) - except: # noqa + except Exception as e: # noqa # Horse does not terminate properly + raise e os._exit(1) # os._exit() is the way to exit from childs after a fork(), in