diff --git a/openerp/cli/server.py b/openerp/cli/server.py index 24987c098e4..97737a38c3f 100644 --- a/openerp/cli/server.py +++ b/openerp/cli/server.py @@ -168,6 +168,11 @@ def main(args): import_translation() sys.exit(0) + # This needs to be done now to ensure the use of the multiprocessing + # signaling mecanism for registries loaded with -d + if config['workers']: + openerp.multi_process = True + # preload registryies, needed for -u --stop_after_init rc = 0 if config['db_name']: diff --git a/openerp/service/server.py b/openerp/service/server.py index 80a7155926b..7fa6dae0015 100644 --- a/openerp/service/server.py +++ b/openerp/service/server.py @@ -828,7 +828,6 @@ def start(): global server load_server_wide_modules() if config['workers']: - openerp.multi_process = True server = PreforkServer(openerp.service.wsgi_server.application) elif openerp.evented: server = GeventServer(openerp.service.wsgi_server.application)