X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fshow_new.py;h=cb40a4c98804be917ed9477039f9b65192bc1058;hb=317c4c7f173540de71907f1e527437d88f48a3b9;hp=183c1bb5b1f7bf6ba8ba5d10e288a9039083a780;hpb=6b790434ac5d30b64681fa45fb020942561fce1a;p=dak.git diff --git a/dak/show_new.py b/dak/show_new.py index 183c1bb5..cb40a4c9 100755 --- a/dak/show_new.py +++ b/dak/show_new.py @@ -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 @@ -186,16 +187,18 @@ def do_pkg(changes_file): print >> outfile, html_header(changes["source"], filestoexamine) - check_valid(new) + check_valid(new, session) distribution = changes["distribution"].keys()[0] print >> outfile, examine_package.display_changes(distribution, changes_file) for fn in filter(lambda fn: fn.endswith(".dsc"), filestoexamine): - print >> outfile, examine_package.check_dsc(distribution, fn) + print >> outfile, examine_package.check_dsc(distribution, fn, session) for fn in filter(lambda fn: fn.endswith(".deb") or fn.endswith(".udeb"), filestoexamine): - print >> outfile, examine_package.check_deb(distribution, fn) + print >> outfile, examine_package.check_deb(distribution, fn, session) print >> outfile, html_footer() + + outfile.close() session.close() ################################################################################ @@ -243,12 +246,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))