[FIX] wsgi: use wsgi.core instead of wsgi, remove unused variable.

bzr revid: vmt@openerp.com-20120210151715-5vei5cbpdlimlqj5
This commit is contained in:
Vo Minh Thu 2012-02-10 16:17:15 +01:00
parent db7e1f37a5
commit 4890c95447
3 changed files with 6 additions and 4 deletions

View File

@ -71,7 +71,7 @@ def start_services():
openerp.netsvc.Server.startAll()
# Start the WSGI server.
openerp.wsgi.start_server()
openerp.wsgi.core.start_server()
def stop_services():
@ -80,7 +80,7 @@ def stop_services():
openerp.cron.cancel_all()
openerp.netsvc.Server.quitAll()
openerp.wsgi.stop_server()
openerp.wsgi.core.stop_server()
config = openerp.tools.config
_logger.info("Initiating shutdown")
_logger.info("Hit CTRL-C again or send a second signal to force the shutdown.")

View File

@ -27,4 +27,7 @@ This module offers a WSGI interface to/from OpenERP.
from . import core
# TODO: This is for the web addons, can be removed later.
register_wsgi_handler = core.register_wsgi_handler
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -421,7 +421,6 @@ def serve():
# TODO Change the xmlrpc_* options to http_*
interface = config['xmlrpc_interface'] or '0.0.0.0'
port = config['xmlrpc_port']
proxy_msg = ' in proxy mode' if config['proxy_mode'] else ''
try:
import werkzeug.serving
if config['proxy_mode']:
@ -448,7 +447,7 @@ def start_server():
The WSGI server can be shutdown with stop_server() below.
"""
threading.Thread(target=openerp.wsgi.serve).start()
threading.Thread(target=serve).start()
def stop_server():
""" Initiate the shutdown of the WSGI server.