From b23f3a80b9a82d4179246bd76c50fe6688489c64 Mon Sep 17 00:00:00 2001 From: Joerg Jaspert Date: Mon, 12 Jul 2010 21:30:31 +0200 Subject: [PATCH] Serialize by suite Signed-off-by: Joerg Jaspert --- dak/generate_packages_sources.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dak/generate_packages_sources.py b/dak/generate_packages_sources.py index 7820974a..08940c78 100755 --- a/dak/generate_packages_sources.py +++ b/dak/generate_packages_sources.py @@ -360,19 +360,19 @@ def main (): startdir = os.getcwd() os.chdir(cnf["Dir::TempPath"]) - # Setup a multiprocessing Pool. As many workers as we have CPU cores. - pool = Pool() - # For each given suite, each architecture, run one apt-ftparchive for s in suites: + # Setup a multiprocessing Pool. As many workers as we have CPU cores. + pool = Pool() arch_list=get_suite_architectures(s.suite_name, skipsrc=False, skipall=True, session=session) Logger.log(['generating output for Suite %s, Architectures %s' % (s.suite_name, map(sname, arch_list))]) for a in arch_list: pool.apply_async(generate_packages_sources, (a.arch_string, s.suite_name, cnf["Dir::TempPath"])) - # No more work will be added to our pool, close it and then wait for all to finish - pool.close() - pool.join() + # No more work will be added to our pool, close it and then wait for all to finish + pool.close() + pool.join() + os.chdir(startdir) # this script doesn't change the database session.close() -- 2.39.5