Skip to content

Commit

Permalink
make it more readable
Browse files Browse the repository at this point in the history
  • Loading branch information
cenkalti committed Jul 22, 2013
1 parent 073ce87 commit d7ee09c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kuyruk/master.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@ def get_queues(self):

def shutdown_workers(self, kill=False):
"""Sends shutdown signal to all workers."""
kill_signal = signal.SIGKILL if kill else signal.SIGTERM
for worker in self.workers:
os.kill(worker.pid, signal.SIGKILL if kill else signal.SIGTERM)
os.kill(worker.pid, kill_signal)

def wait_for_workers(self):
"""Loops until any of the self.workers is alive.
Expand Down

0 comments on commit d7ee09c

Please sign in to comment.