From: Ansgar Burchardt Date: Thu, 3 Jan 2013 20:30:36 +0000 (+0100) Subject: dak/show_new.py: setup worker pool before connecting to database X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=24cb4fe2729e5805e8a9d81149dce947787ee20d;p=dak.git dak/show_new.py: setup worker pool before connecting to database --- diff --git a/dak/show_new.py b/dak/show_new.py index efc4ee8c..f45ffe9d 100755 --- a/dak/show_new.py +++ b/dak/show_new.py @@ -245,13 +245,14 @@ def init(session): ################################################################################ def main(): + pool = DakProcessPool(processes=5) + session = DBConn().session() upload_ids = [ u.id for u in init(session) ] session.close() examine_package.use_html=1 - pool = DakProcessPool(processes=5) p = pool.map_async(do_pkg, upload_ids) pool.close()