diff --git a/rq/worker.py b/rq/worker.py index 789a2e8..edb3a03 100644 --- a/rq/worker.py +++ b/rq/worker.py @@ -376,6 +376,8 @@ class Worker(object): """ try: os.kill(self.horse_pid, sig) + os.waitpid(self.horse_pid, 0) + self.log.info('Killed horse pid %s', self.horse_pid) except OSError as e: if e.errno == errno.ESRCH: # "No such process" is fine with us