Stop looping if all workers have died
If the workers are crashing and the restart limit has been met, we need to stop listening for events and trigger an internal error.
This commit is contained in:
@@ -120,6 +120,10 @@ class DSession:
|
||||
def loop_once(self):
|
||||
"""Process one callback from one of the slaves."""
|
||||
while 1:
|
||||
if not self._active_nodes:
|
||||
# If everything has died stop looping
|
||||
self.triggershutdown()
|
||||
raise RuntimeError("Unexpectedly no active workers available")
|
||||
try:
|
||||
eventcall = self.queue.get(timeout=2.0)
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user