mirror of https://github.com/rq/rq.git
Merge pull request #457 from jlopex/block_until_horse_finishes
Make parent worker process wait until horse process finishes
This commit is contained in:
commit
eae2c40ea0
|
@ -473,7 +473,9 @@ class Worker(object):
|
||||||
self.procline('Forked %d at %d' % (child_pid, time.time()))
|
self.procline('Forked %d at %d' % (child_pid, time.time()))
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
|
self.set_state('busy')
|
||||||
os.waitpid(child_pid, 0)
|
os.waitpid(child_pid, 0)
|
||||||
|
self.set_state('idle')
|
||||||
break
|
break
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
# In case we encountered an OSError due to EINTR (which is
|
# In case we encountered an OSError due to EINTR (which is
|
||||||
|
|
Loading…
Reference in New Issue