Skip to content
Snippets Groups Projects
Commit 1e1b85e9 authored by Antony Lesuisse's avatar Antony Lesuisse
Browse files

gevent first try

bzr revid: al@openerp.com-20120922124354-unk1u8a9anst5hwo
parent d61bae80
No related branches found
No related tags found
No related merge requests found
......@@ -223,6 +223,12 @@ def main():
check_root_user()
openerp.tools.config.parse_config(sys.argv[1:])
# TODO GEVENT if event
import gevent.monkey
gevent.monkey.patch_all()
import gevent_psycopg2
gevent_psycopg2.monkey_patch()
check_postgres_user()
openerp.netsvc.init_logger()
report_configuration()
......
......@@ -86,7 +86,8 @@ def start_services():
netrpc_server.init_servers()
# Start the main cron thread.
openerp.cron.start_master_thread()
# TODO GEVENT if event use greenlet in cron
# openerp.cron.start_master_thread()
# Start the top-level servers threads (normally HTTP, HTTPS, and NETRPC).
openerp.netsvc.Server.startAll()
......
......@@ -424,7 +424,10 @@ def serve():
# TODO Change the xmlrpc_* options to http_*
interface = config['xmlrpc_interface'] or '0.0.0.0'
port = config['xmlrpc_port']
httpd = werkzeug.serving.make_server(interface, port, application, threaded=True)
#httpd = werkzeug.serving.make_server(interface, port, application, threaded=True)
# TODO GEVENT if event
from gevent.wsgi import WSGIServer
httpd = WSGIServer((interface, port), application)
_logger.info('HTTP service (werkzeug) running on %s:%s', interface, port)
httpd.serve_forever()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment