Skip to content

Commit

Permalink
terminate mrq-worker if scheduler greenlet fails
Browse files Browse the repository at this point in the history
  • Loading branch information
ggueret committed Jul 18, 2016
1 parent aa2a294 commit 2d338ed
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mrq/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,10 @@ def work_loop(self, max_jobs=None):
if self.graceful_stop:
break

# If the scheduler greenlet are crashed, fail loudly.
if self.config["scheduler"] and not self.greenlets["scheduler"]:
break

while True:

free_pool_slots = self.gevent_pool.free_count()
Expand Down

0 comments on commit 2d338ed

Please sign in to comment.