]> err.no Git - dak/commitdiff
show-new: multithreading support
authorTorsten Werner <twerner@debian.org>
Tue, 6 Jul 2010 20:18:45 +0000 (20:18 +0000)
committerTorsten Werner <twerner@debian.org>
Tue, 6 Jul 2010 20:18:45 +0000 (20:18 +0000)
Signed-off-by: Torsten Werner <twerner@debian.org>
dak/show_new.py

index 183c1bb5b1f7bf6ba8ba5d10e288a9039083a780..9cb0890199d7210a985f6eee946c9d3d7f3288b7 100755 (executable)
@@ -37,6 +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
 
 # Globals
 Cnf = None
@@ -243,12 +244,14 @@ def main():
 
     examine_package.use_html=1
 
+    threadpool = ThreadPool()
     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
-        do_pkg (changes_file)
+        threadpool.queueTask(do_pkg, changes_file)
+    threadpool.joinAll()
 
     files = set(os.listdir(cnf["Show-New::HTMLPath"]))
     to_delete = filter(lambda x: x.endswith(".html"), files.difference(sources))