summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Angeletti <orokusaki@users.noreply.github.com>2020-05-12 20:55:11 -0400
committerGitHub <noreply@github.com>2020-05-13 07:55:11 +0700
commit6ab6a0a57319cf496bb55028cd0c152692f6ae55 (patch)
treebe3d00804e273177f816c68283ffefee9546f738
parent9d6f38df0e7629962004f82021e0ed45dd488e2c (diff)
downloadrq-6ab6a0a57319cf496bb55028cd0c152692f6ae55.tar.gz
Remove extraneous try/except (#1247)
The exception handling block was raising the caught exception in-place, which caused the original traceback info to be lost. Rather than replace `raise e` with `raise`, I simply removed the whole try / except, since no action was being taken in the except block.
-rw-r--r--rq/worker.py13
1 files changed, 4 insertions, 9 deletions
diff --git a/rq/worker.py b/rq/worker.py
index d4c423d..2ebfcec 100644
--- a/rq/worker.py
+++ b/rq/worker.py
@@ -747,15 +747,10 @@ class Worker(object):
# that are different from the worker.
random.seed()
- try:
- self.setup_work_horse_signals()
- self._is_horse = True
- self.log = logger
- self.perform_job(job, queue)
- except Exception as e: # noqa
- # Horse does not terminate properly
- raise e
- os._exit(1)
+ self.setup_work_horse_signals()
+ self._is_horse = True
+ self.log = logger
+ self.perform_job(job, queue)
# os._exit() is the way to exit from childs after a fork(), in
# contrast to the regular sys.exit()