##// END OF EJS Templates
middleware: use timing for complete stack call
super-admin -
r4997:81144f1e default
parent child Browse files
Show More
@@ -367,8 +367,8 b' def includeme(config, auth_resources=Non'
367 config.include('rhodecode.integrations')
367 config.include('rhodecode.integrations')
368
368
369 config.add_route('rhodecode_support', 'https://rhodecode.com/help/', static=True)
369 config.add_route('rhodecode_support', 'https://rhodecode.com/help/', static=True)
370 settings['default_locale_name'] = settings.get('lang', 'en')
370 config.add_translation_dirs('rhodecode:i18n/')
371 config.add_translation_dirs('rhodecode:i18n/')
371 settings['default_locale_name'] = settings.get('lang', 'en')
372
372
373 # Add subscribers.
373 # Add subscribers.
374 if load_all:
374 if load_all:
@@ -433,6 +433,7 b' def wrap_app_in_wsgi_middlewares(pyramid'
433 # this should be the outer most middleware in the wsgi stack since
433 # this should be the outer most middleware in the wsgi stack since
434 # middleware like Routes make database calls
434 # middleware like Routes make database calls
435 def pyramid_app_with_cleanup(environ, start_response):
435 def pyramid_app_with_cleanup(environ, start_response):
436 start = time.time()
436 try:
437 try:
437 return pyramid_app(environ, start_response)
438 return pyramid_app(environ, start_response)
438 finally:
439 finally:
@@ -445,7 +446,8 b' def wrap_app_in_wsgi_middlewares(pyramid'
445 # if not, then something, somewhere is leaving a connection open
446 # if not, then something, somewhere is leaving a connection open
446 pool = meta.Base.metadata.bind.engine.pool
447 pool = meta.Base.metadata.bind.engine.pool
447 log.debug('sa pool status: %s', pool.status())
448 log.debug('sa pool status: %s', pool.status())
448 log.debug('Request processing finalized')
449 total = time.time() - start
450 log.debug('Request processing finalized: %.4fs', total)
449
451
450 return pyramid_app_with_cleanup
452 return pyramid_app_with_cleanup
451
453
General Comments 0
You need to be logged in to leave comments. Login now