From 04680f1020eba480e2b35106cbf59c0e650b5871 Mon Sep 17 00:00:00 2001 From: Randall Leeds Date: Sun, 18 Sep 2011 02:13:01 -0700 Subject: [PATCH] fix inverted request_time computation --- gunicorn/workers/async.py | 2 +- gunicorn/workers/sync.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gunicorn/workers/async.py b/gunicorn/workers/async.py index 9ffa0df4b..b1898e990 100644 --- a/gunicorn/workers/async.py +++ b/gunicorn/workers/async.py @@ -68,7 +68,7 @@ def handle_request(self, req, sock, addr): for item in respiter: resp.write(item) resp.close() - request_time = request_start - datetime.now() + request_time = datetime.now() - request_start self.log.access(resp, environ, request_time) finally: if hasattr(respiter, "close"): diff --git a/gunicorn/workers/sync.py b/gunicorn/workers/sync.py index 5c4b65ff8..b89830cad 100644 --- a/gunicorn/workers/sync.py +++ b/gunicorn/workers/sync.py @@ -104,7 +104,7 @@ def handle_request(self, req, client, addr): for item in respiter: resp.write(item) resp.close() - request_time = request_start - datetime.now() + request_time = datetime.now() - request_start self.log.access(resp, environ, request_time) finally: if hasattr(respiter, "close"):