]> err.no Git - dak/commitdiff
dak/show_new.py: setup worker pool before connecting to database
authorAnsgar Burchardt <ansgar@debian.org>
Thu, 3 Jan 2013 20:30:36 +0000 (21:30 +0100)
committerAnsgar Burchardt <ansgar@debian.org>
Thu, 3 Jan 2013 20:30:36 +0000 (21:30 +0100)
dak/show_new.py

index efc4ee8c40ff43247968618abcbca3bff4bf0569..f45ffe9d622616b8767f5d683e40e5bb5e4842df 100755 (executable)
@@ -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()