X-Git-Url: http://git.inspyration.org/?a=blobdiff_plain;f=openerp-wsgi.py;h=1ad46a13528c1c5d4a6a248eb6f85b58bbe362c2;hb=HEAD;hp=7382b90d3b7f66006a7e626e90f1a4e8450fbb3d;hpb=4679680dba42a4071c8fbbc43a33e2e61bdb812e;p=odoo%2Fodoo.git diff --git a/openerp-wsgi.py b/openerp-wsgi.py index 7382b90..1ad46a1 100644 --- a/openerp-wsgi.py +++ b/openerp-wsgi.py @@ -1,35 +1,43 @@ -#!/usr/bin/python -# WSGI Handler sample configuration file. -# -# Change the appropriate settings below, in order to provide the parameters -# that would normally be passed in the command-line. -# (at least conf['addons_path']) -# -# For generic wsgi handlers a global application is defined. -# For uwsgi this should work: -# $ uwsgi --http :9090 --pythonpath . --wsgi-file openerp-wsgi.py -# -# For gunicorn additional globals need to be defined in the Gunicorn section. -# Then the following command should run: -# $ gunicorn openerp:wsgi.core.application -c gunicorn.conf.py +# -*- coding: utf-8 -*- + +""" +WSGI Handler sample configuration file. +======================================= + +Change the appropriate settings below, in order to provide the parameters +that would normally be passed in the command-line. + +* For uwsgi this should work: + + $ uwsgi_python --http :9090 --pythonpath . --wsgi-file openerp-wsgi.py + +For gunicorn additional globals need to be defined in the Gunicorn section. + + $ gunicorn openerp:service.wsgi_server.application -c openerp-wsgi.py +""" import openerp #---------------------------------------------------------- # Common #---------------------------------------------------------- +openerp.multi_process = True + # Equivalent of --load command-line option openerp.conf.server_wide_modules = ['web'] conf = openerp.tools.config # Path to the OpenERP Addons repository (comma-separated for # 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'] = '/opt/odoo/addons,/opt/odoo/include/custom/8.0' + +#conf['admin_passwd'] = 'TrucSuperCompliquéEtVachementSecret' # Optional database config if not using local socket -#conf['db_name'] = 'mycompany' +#conf['db_name'] = 'TODO' +#conf['dbfilter'] = 'TODO' +#conf['list_db'] = 'TODO' #conf['db_host'] = 'localhost' #conf['db_user'] = 'foo' #conf['db_port'] = 5432 @@ -40,14 +48,16 @@ conf['addons_path'] = '/home/wis/stuff/version/openerp/source/addons/6.1,/home/w #---------------------------------------------------------- application = openerp.service.wsgi_server.application +openerp.service.server.load_server_wide_modules() + #---------------------------------------------------------- # Gunicorn #---------------------------------------------------------- # Standard OpenERP XML-RPC port is 8069 -bind = '127.0.0.1:8069' -pidfile = '.gunicorn.pid' -workers = 4 -timeout = 240 -max_requests = 2000 +#bind = '127.0.0.1:8069' +#pidfile = '.gunicorn.pid' +#workers = 4 +#timeout = 240 +#max_requests = 2000 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: