diff --git a/rhodecode/config/middleware.py b/rhodecode/config/middleware.py --- a/rhodecode/config/middleware.py +++ b/rhodecode/config/middleware.py @@ -367,8 +367,8 @@ def includeme(config, auth_resources=Non config.include('rhodecode.integrations') config.add_route('rhodecode_support', 'https://rhodecode.com/help/', static=True) + settings['default_locale_name'] = settings.get('lang', 'en') config.add_translation_dirs('rhodecode:i18n/') - settings['default_locale_name'] = settings.get('lang', 'en') # Add subscribers. if load_all: @@ -433,6 +433,7 @@ def wrap_app_in_wsgi_middlewares(pyramid # this should be the outer most middleware in the wsgi stack since # middleware like Routes make database calls def pyramid_app_with_cleanup(environ, start_response): + start = time.time() try: return pyramid_app(environ, start_response) finally: @@ -445,7 +446,8 @@ def wrap_app_in_wsgi_middlewares(pyramid # if not, then something, somewhere is leaving a connection open pool = meta.Base.metadata.bind.engine.pool log.debug('sa pool status: %s', pool.status()) - log.debug('Request processing finalized') + total = time.time() - start + log.debug('Request processing finalized: %.4fs', total) return pyramid_app_with_cleanup