Permalink
Browse files

Merge pull request #552 from hadesgames/master

Fixes process leak when using update_index with workers.
  • Loading branch information...
2 parents 0dd3e49 + d4cbf72 commit 0e95d8696f8ba770f9c60152136aba32f5591fd6 @jezdez jezdez committed Dec 13, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 haystack/management/commands/update_index.py
@@ -244,6 +244,7 @@ def handle_label(self, label, **options):
if self.workers > 0:
pool = multiprocessing.Pool(self.workers)
pool.map(worker, ghetto_queue)
+ pool.terminate()
if self.remove:
if self.start_date or self.end_date or total <= 0:
@@ -267,3 +268,4 @@ def handle_label(self, label, **options):
if self.workers > 0:
pool = multiprocessing.Pool(self.workers)
pool.map(worker, ghetto_queue)
+ pool.terminate()

0 comments on commit 0e95d86

Please sign in to comment.