Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes process leak when using update_index with workers. #552

Merged
merged 1 commit into from Dec 13, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions haystack/management/commands/update_index.py
Expand Up @@ -228,6 +228,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:
Expand All @@ -251,3 +252,4 @@ def handle_label(self, label, **options):
if self.workers > 0:
pool = multiprocessing.Pool(self.workers)
pool.map(worker, ghetto_queue)
pool.terminate()