[IMP] http: code cleaning
reuse current_thread result No needed to call threading.current_thread() on evry arg setting closes odoo/odoo#32000 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
This commit is contained in:
committed by
Martin Trigaux
parent
1656557e81
commit
6b73d23f7a
+6
-4
@@ -1410,10 +1410,12 @@ class Root(object):
|
||||
httprequest = werkzeug.wrappers.Request(environ)
|
||||
httprequest.app = self
|
||||
httprequest.parameter_storage_class = werkzeug.datastructures.ImmutableOrderedMultiDict
|
||||
threading.current_thread().url = httprequest.url
|
||||
threading.current_thread().query_count = 0
|
||||
threading.current_thread().query_time = 0
|
||||
threading.current_thread().perf_t0 = time.time()
|
||||
|
||||
current_thread = threading.current_thread()
|
||||
current_thread.url = httprequest.url
|
||||
current_thread.query_count = 0
|
||||
current_thread.query_time = 0
|
||||
current_thread.perf_t0 = time.time()
|
||||
|
||||
explicit_session = self.setup_session(httprequest)
|
||||
self.setup_db(httprequest)
|
||||
|
||||
Reference in New Issue
Block a user