File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,6 @@ def process_request(self, request):
78
78
79
79
def generate_stats (self , request , response ):
80
80
records = collector .get_collection ()
81
- self ._records [threading .currentThread ()] = records
81
+ self ._records [threading .current_thread ()] = records
82
82
collector .clear_collection ()
83
83
self .record_stats ({"records" : records })
Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ def process_request(self, request):
118
118
119
119
def generate_stats (self , request , response ):
120
120
used_paths = collector .get_collection ()
121
- self ._paths [threading .currentThread ()] = used_paths
121
+ self ._paths [threading .current_thread ()] = used_paths
122
122
123
123
self .record_stats (
124
124
{
Original file line number Diff line number Diff line change @@ -252,14 +252,14 @@ def get_collection(self, thread=None):
252
252
is provided, returns a list for the current thread.
253
253
"""
254
254
if thread is None :
255
- thread = threading .currentThread ()
255
+ thread = threading .current_thread ()
256
256
if thread not in self .collections :
257
257
self .collections [thread ] = []
258
258
return self .collections [thread ]
259
259
260
260
def clear_collection (self , thread = None ):
261
261
if thread is None :
262
- thread = threading .currentThread ()
262
+ thread = threading .current_thread ()
263
263
if thread in self .collections :
264
264
del self .collections [thread ]
265
265
You can’t perform that action at this time.
0 commit comments