Added long polling executable

bzr revid: nicolas.vanhoren@openerp.com-20130606113237-ov1t2txl9gn6mx3g
This commit is contained in:
niv-openerp 2013-06-06 13:32:37 +02:00
parent b16935efdc
commit c8719220a7
2 changed files with 19 additions and 2 deletions

11
long_polling Normal file
View File

@ -0,0 +1,11 @@
#!/usr/bin/env python
import gevent.monkey
gevent.monkey.patch_all()
import gevent_psycopg2
gevent_psycopg2.monkey_patch()
import openerp
if __name__ == "__main__":
openerp.cli.main()

View File

@ -23,6 +23,14 @@
"""
import sys
# Is the server running with gevent.
evented = False
if sys.modules.get("gevent") is not None:
evented = True
# Make sure the OpenERP server runs in UTC. This is especially necessary
# under Windows as under Linux it seems the real import of time is
# sufficiently deferred so that setting the TZ environment variable
@ -61,8 +69,6 @@ wsgi.register_wsgi_handler = wsgi.wsgi_server.register_wsgi_handler
# its own copy of the data structure and we don't need to care about
# locks between threads.
multi_process = False
# Is the server running with gevent.
evented = False
def registry(database_name):
"""