[IMP] openerp-server: start services, load any server-wide module, then preload some registries.
bzr revid: vmt@openerp.com-20111007131902-bcq26tpmc2u6iwlh
This commit is contained in:
parent
c6f3186571
commit
d239f6bcd1
|
@ -232,13 +232,6 @@ if __name__ == "__main__":
|
|||
# services to be running before loading any registry.
|
||||
openerp.service.start_services()
|
||||
|
||||
if config['db_name']:
|
||||
for dbname in config['db_name'].split(','):
|
||||
preload_registry(dbname)
|
||||
|
||||
if config["stop_after_init"]:
|
||||
sys.exit(0)
|
||||
|
||||
for m in openerp.conf.server_wide_modules:
|
||||
try:
|
||||
__import__(m)
|
||||
|
@ -254,6 +247,13 @@ The `web` module is provided by the addons found in the `openerp-web` project.
|
|||
Maybe you forgot to add those addons in your addons_path configuration."""
|
||||
logging.exception('Failed to load server-wide module `%s`.%s', m, msg)
|
||||
|
||||
if config['db_name']:
|
||||
for dbname in config['db_name'].split(','):
|
||||
preload_registry(dbname)
|
||||
|
||||
if config["stop_after_init"]:
|
||||
sys.exit(0)
|
||||
|
||||
setup_pid_file()
|
||||
logger = logging.getLogger('server')
|
||||
logger.info('OpenERP server is running, waiting for connections...')
|
||||
|
|
Loading…
Reference in New Issue