]> err.no Git - dak/commitdiff
show-new: Use dakmultiprocessing
authorAnsgar Burchardt <ansgar@debian.org>
Sat, 26 Mar 2011 17:13:11 +0000 (17:13 +0000)
committerAnsgar Burchardt <ansgar@debian.org>
Sat, 26 Mar 2011 17:13:11 +0000 (17:13 +0000)
Signed-off-by: Ansgar Burchardt <ansgar@debian.org>
dak/show_new.py

index 8405aeef9f0fe2391d9e969169b944db7abf179b..84b45077b1d11733b55cfd89cdc789e727092cac 100755 (executable)
@@ -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))