Fix url bug
This commit is contained in:
parent
580a4019c7
commit
533b5aa7c8
1 changed files with 15 additions and 15 deletions
|
@ -155,9 +155,9 @@ class SlowRequestMiddleware(object):
|
|||
logger_slow = logging.getLogger("judge.slow_request")
|
||||
start_time = time.time()
|
||||
response = self.get_response(request)
|
||||
if response.status_code == 200:
|
||||
response_time = time.time() - start_time
|
||||
url_name = resolve(request.path).url_name
|
||||
|
||||
message = {
|
||||
"url_name": url_name,
|
||||
"response_time": response_time * 1000,
|
||||
|
|
Loading…
Reference in a new issue