X-Git-Url: http://git.inspyration.org/?a=blobdiff_plain;f=openerp%2F__init__.py;h=02f879c4929ddf7278693b5a2af1a08285007eec;hb=cdf87a206361e51895210ca3e24c5bfcace39939;hp=5827b744cf891d6b81632ebbc1b65426d57a2459;hpb=01f3d0fc985fe4f98d10c88921f33676c84c4757;p=odoo%2Fodoo.git diff --git a/openerp/__init__.py b/openerp/__init__.py index 5827b74..02f879c 100644 --- a/openerp/__init__.py +++ b/openerp/__init__.py @@ -22,10 +22,22 @@ """ OpenERP core library. """ + +# 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 +# in openerp.cli.server was working. +import os +os.environ['TZ'] = 'UTC' # Set the timezone... +import time # ... *then* import time. +del os +del time + # The hard-coded super-user id (a.k.a. administrator, or root user). SUPERUSER_ID = 1 import addons +import cli import conf import loglevels import modules @@ -34,15 +46,20 @@ import osv import pooler import release import report -import run_tests import service import sql_db -import test -import tiny_socket import tools -import wizard import workflow -import wsgi +# backward compatilbility +# TODO: This is for the web addons, can be removed later. +wsgi = service +wsgi.register_wsgi_handler = wsgi.wsgi_server.register_wsgi_handler +# Is the server running in multi-process mode (e.g. behind Gunicorn). +# If this is True, the processes have to communicate some events, +# 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 +# locks between threads. +multi_process = False # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: