mirror of
https://github.com/searxng/searxng
synced 2024-01-01 18:24:07 +00:00
[fix] measure request duration only if total_time attribute is set - fixes autocompleter
This commit is contained in:
parent
060c797739
commit
27e95846ea
@ -122,8 +122,8 @@ def request(method, url, **kwargs):
|
|||||||
# session end
|
# session end
|
||||||
session.close()
|
session.close()
|
||||||
|
|
||||||
#
|
if hasattr(threadLocal, 'total_time'):
|
||||||
threadLocal.total_time += time_after_request - time_before_request
|
threadLocal.total_time += time_after_request - time_before_request
|
||||||
|
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user