X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fshow_new.py;h=1397a324f6eae35d2fd8a5b5d105fda3a1a6bdb9;hb=14015fee8d448f25fff0e8705cae3d8de7b1008e;hp=89d2e82c98b080e11eba9063c27c5f899cbdbc96;hpb=a7f77393881783e65423f1f36778c67c52e5213d;p=dak.git diff --git a/dak/show_new.py b/dak/show_new.py index 89d2e82c..1397a324 100755 --- a/dak/show_new.py +++ b/dak/show_new.py @@ -223,7 +223,8 @@ def init(session): cnf = Config() Arguments = [('h',"help","Show-New::Options::Help"), - ("p","html-path","Show-New::HTMLPath","HasArg")] + ("p","html-path","Show-New::HTMLPath","HasArg"), + ('q','queue','Show-New::Options::Queue','HasArg')] for i in ["help"]: if not cnf.has_key("Show-New::Options::%s" % (i)): @@ -235,8 +236,9 @@ def init(session): if Options["help"]: usage() + queue_names = Options.find('Queue', 'new').split(',') uploads = session.query(PolicyQueueUpload) \ - .join(PolicyQueueUpload.policy_queue).filter(PolicyQueue.queue_name == 'new') \ + .join(PolicyQueueUpload.policy_queue).filter(PolicyQueue.queue_name.in_(queue_names)) \ .join(PolicyQueueUpload.changes).order_by(DBChange.source) if len(changesnames) > 0: @@ -249,18 +251,19 @@ def init(session): ################################################################################ def main(): + examine_package.use_html = True pool = DakProcessPool(processes=5) session = DBConn().session() upload_ids = [ u.id for u in init(session) ] session.close() - examine_package.use_html=1 - - p = pool.map_async(do_pkg, upload_ids) + for upload_id in upload_ids: + pool.apply_async(do_pkg, [upload_id]) pool.close() - p.wait(timeout=600) + #p.wait(timeout=600) + pool.join() for htmlfile in htmlfiles_to_process: with open(htmlfile, "w") as fd: fd.write(timeout_str)