Mercurial > kallithea
changeset 7999:1a409593f352
app: drop finally handling in BaseVCSController.__call__
Our optional 'wrapper' middleware is logging response times more correctly
after b42ee1bdf082 - there is no point in logging the timing of the __call__ in
the main app.
Similarly, the session was removed too early. But TurboGears is already picking
up our db session and using DBSessionRemoverMiddleware to .remove() it ... and
at the right time. So just stop trying.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Sun, 24 Nov 2019 00:16:31 +0100 |
parents | a1115795fabb |
children | 096ce7327aad |
files | kallithea/lib/base.py |
diffstat | 1 files changed, 0 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/lib/base.py Sat Nov 16 16:49:04 2019 +0100 +++ b/kallithea/lib/base.py Sun Nov 24 00:16:31 2019 +0100 @@ -30,7 +30,6 @@ import datetime import logging -import time import traceback import warnings @@ -300,7 +299,6 @@ return _get_ip_addr(environ) def __call__(self, environ, start_response): - start = time.time() try: # try parsing a request for this VCS - if it fails, call the wrapped app parsed_request = self.parse_request(environ) @@ -343,10 +341,6 @@ except webob.exc.HTTPException as e: return e(environ, start_response) - finally: - log_ = logging.getLogger('kallithea.' + self.__class__.__name__) - log_.debug('Request time: %.3fs', time.time() - start) - meta.Session.remove() class BaseController(TGController):