From: Ansgar Burchardt Date: Sat, 26 Mar 2011 17:13:11 +0000 (+0000) Subject: show-new: Use dakmultiprocessing X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=191de7990dfe0590dc82649497888c85c8e69628;p=dak show-new: Use dakmultiprocessing Signed-off-by: Ansgar Burchardt --- diff --git a/dak/show_new.py b/dak/show_new.py index 8405aeef..84b45077 100755 --- a/dak/show_new.py +++ b/dak/show_new.py @@ -37,7 +37,7 @@ from daklib.regexes import re_source_ext from daklib.config import Config from daklib import daklog from daklib.changesutils import * -from daklib.threadpool import ThreadPool +from daklib.dakmultiprocessing import Pool # Globals Cnf = None @@ -250,14 +250,15 @@ def main(): examine_package.use_html=1 - threadpool = ThreadPool() + pool = Pool() for changes_file in changes_files: changes_file = utils.validate_changes_file_arg(changes_file, 0) if not changes_file: continue print "\n" + changes_file - threadpool.queueTask(do_pkg, changes_file) - threadpool.joinAll() + pool.apply_async(do_pkg, (changes_file,)) + pool.close() + pool.join() files = set(os.listdir(cnf["Show-New::HTMLPath"])) to_delete = filter(lambda x: x.endswith(".html"), files.difference(sources))