From: Ansgar Burchardt Date: Mon, 5 Sep 2011 19:28:25 +0000 (+0000) Subject: Delay setting up worker pool. X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=beb6081fb332c10eacf57bed5ac4ed503fd59478;p=dak.git Delay setting up worker pool. We need to delay creating the worker pool until we have parsed the command line options so that changes also take effect in child processes. --- diff --git a/dak/generate_packages_sources2.py b/dak/generate_packages_sources2.py index 5716e7e1..4b2a1d18 100755 --- a/dak/generate_packages_sources2.py +++ b/dak/generate_packages_sources2.py @@ -293,10 +293,6 @@ def generate_translations(suite_id, component_id): ############################################################################# def main(): - from daklib.dakmultiprocessing import DakProcessPool, PROC_STATUS_SUCCESS, PROC_STATUS_SIGNALRAISED - pool = DakProcessPool() - - from daklib.dbconn import Component, DBConn, get_suite, Suite from daklib.config import Config from daklib import daklog @@ -317,8 +313,12 @@ def main(): if Options.has_key("Help"): usage() + from daklib.dakmultiprocessing import DakProcessPool, PROC_STATUS_SUCCESS, PROC_STATUS_SIGNALRAISED + pool = DakProcessPool() + logger = daklog.Logger('generate-packages-sources2') + from daklib.dbconn import Component, DBConn, get_suite, Suite session = DBConn().session() session.execute("SELECT add_missing_description_md5()") session.commit()