From fc5295edfcfd589489a56d4f4e4849edc5e063d0 Mon Sep 17 00:00:00 2001 From: Javier Lopez Date: Tue, 2 Dec 2014 11:02:14 +0100 Subject: [PATCH] Set busy state on parent while waiting for horse --- rq/worker.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rq/worker.py b/rq/worker.py index bf40a65..51411b2 100644 --- a/rq/worker.py +++ b/rq/worker.py @@ -435,7 +435,9 @@ class Worker(object): self.procline('Forked %d at %d' % (child_pid, time.time())) while True: try: + self.set_state('busy') os.waitpid(child_pid, 0) + self.set_state('idle') break except OSError as e: # In case we encountered an OSError due to EINTR (which is