]> git.decadent.org.uk Git - dak.git/commitdiff
dak/generate_releases.py: create worker pool before connection to database
authorAnsgar Burchardt <ansgar@debian.org>
Sun, 4 Nov 2012 11:19:36 +0000 (12:19 +0100)
committerAnsgar Burchardt <ansgar@debian.org>
Sun, 4 Nov 2012 11:19:36 +0000 (12:19 +0100)
We do not want to have the file descriptor for the database connection
in the worker processes.

dak/generate_releases.py

index 8d3635e2e2b9fb611ed4784befc1d39d26a3f21a..798726bb9ec887b2c9c6146415b0a4e06cc7de43 100755 (executable)
@@ -312,6 +312,7 @@ def main ():
         usage()
 
     Logger = daklog.Logger('generate-releases')
+    pool = DakProcessPool()
 
     session = DBConn().session()
 
@@ -332,8 +333,6 @@ def main ():
 
     broken=[]
 
-    pool = DakProcessPool()
-
     for s in suites:
         # Setup a multiprocessing Pool. As many workers as we have CPU cores.
         if s.untouchable and not Options["Force"]: