Skip to content

Commit

Permalink
Merge branch 'master' of github.com:rq/rq
Browse files Browse the repository at this point in the history
  • Loading branch information
selwin committed May 13, 2020
2 parents 02eb983 + 6ab6a0a commit e6e5703
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions rq/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -747,15 +747,10 @@ def main_work_horse(self, job, queue):
# 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()
Expand Down

0 comments on commit e6e5703

Please sign in to comment.