[FIX] wsgi wrapper
bzr revid: al@openerp.com-20120924103648-uhxteeu6nd8batvd
This commit is contained in:
parent
70f6e847f3
commit
6c60619a2b
|
@ -7,7 +7,7 @@
|
||||||
#
|
#
|
||||||
# For generic wsgi handlers a global application is defined.
|
# For generic wsgi handlers a global application is defined.
|
||||||
# For uwsgi this should work:
|
# For uwsgi this should work:
|
||||||
# $ uwsgi --http :9090 --pythonpath . --wsgi-file openerp-wsgi.py
|
# $ uwsgi_python --http :9090 --pythonpath . --wsgi-file openerp-wsgi.py
|
||||||
#
|
#
|
||||||
# For gunicorn additional globals need to be defined in the Gunicorn section.
|
# For gunicorn additional globals need to be defined in the Gunicorn section.
|
||||||
# Then the following command should run:
|
# Then the following command should run:
|
||||||
|
@ -18,15 +18,16 @@ import openerp
|
||||||
#----------------------------------------------------------
|
#----------------------------------------------------------
|
||||||
# Common
|
# Common
|
||||||
#----------------------------------------------------------
|
#----------------------------------------------------------
|
||||||
|
openerp.multi_process = True # Nah!
|
||||||
|
|
||||||
# Equivalent of --load command-line option
|
# Equivalent of --load command-line option
|
||||||
openerp.conf.server_wide_modules = ['web']
|
openerp.conf.server_wide_modules = ['web']
|
||||||
conf = openerp.tools.config
|
conf = openerp.tools.config
|
||||||
|
|
||||||
# Path to the OpenERP Addons repository (comma-separated for
|
# Path to the OpenERP Addons repository (comma-separated for
|
||||||
# multiple locations)
|
# multiple locations)
|
||||||
conf['addons_path'] = '/home/openerp/addons/trunk,/home/openerp/web/trunk/addons'
|
|
||||||
conf['addons_path'] = '/home/wis/stuff/version/openerp/source/addons/6.1,/home/wis/stuff/version/openerp/source/web/6.1/addons'
|
|
||||||
|
|
||||||
|
conf['addons_path'] = '../../addons/trunk,../../web/trunk/addons'
|
||||||
|
|
||||||
# Optional database config if not using local socket
|
# Optional database config if not using local socket
|
||||||
#conf['db_name'] = 'mycompany'
|
#conf['db_name'] = 'mycompany'
|
||||||
|
|
|
@ -50,7 +50,7 @@ wsgi.register_wsgi_handler = wsgi.wsgi_server.register_wsgi_handler
|
||||||
# e.g. database update or cache invalidation. Each process has also
|
# e.g. database update or cache invalidation. Each process has also
|
||||||
# its own copy of the data structure and we don't need to care about
|
# its own copy of the data structure and we don't need to care about
|
||||||
# locks between threads.
|
# locks between threads.
|
||||||
multi_process = True
|
multi_process = False
|
||||||
|
|
||||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||||
|
|
||||||
|
|
|
@ -78,8 +78,6 @@ def start_internal():
|
||||||
|
|
||||||
def start_services():
|
def start_services():
|
||||||
""" Start all services including http, netrpc and cron """
|
""" Start all services including http, netrpc and cron """
|
||||||
openerp.multi_process = False # Nah!
|
|
||||||
|
|
||||||
start_internal()
|
start_internal()
|
||||||
|
|
||||||
# Initialize the HTTP stack.
|
# Initialize the HTTP stack.
|
||||||
|
@ -120,6 +118,8 @@ def stop_services():
|
||||||
openerp.modules.registry.RegistryManager.delete_all()
|
openerp.modules.registry.RegistryManager.delete_all()
|
||||||
|
|
||||||
def start_services_workers():
|
def start_services_workers():
|
||||||
|
openerp.multi_process = True # Nah!
|
||||||
|
|
||||||
openerp.service.workers.Multicorn(openerp.service.wsgi_server.application).run()
|
openerp.service.workers.Multicorn(openerp.service.wsgi_server.application).run()
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue