Browse Source

[mod] search thread names

Adam Tauber 10 years ago
parent
commit
8e6ae188b8
1 changed files with 5 additions and 2 deletions
  1. 5
    2
      searx/search.py

+ 5
- 2
searx/search.py View File

36
 def threaded_requests(requests):
36
 def threaded_requests(requests):
37
     for fn, url, request_args in requests:
37
     for fn, url, request_args in requests:
38
         th = threading.Thread(
38
         th = threading.Thread(
39
-            target=fn, args=(url,), kwargs=request_args, name=url,
39
+            target=fn,
40
+            args=(url,),
41
+            kwargs=request_args,
42
+            name='search_request',
40
         )
43
         )
41
         th.start()
44
         th.start()
42
 
45
 
43
     for th in threading.enumerate():
46
     for th in threading.enumerate():
44
-        if th.name.startswith('http'):
47
+        if th.name == 'search_request':
45
             th.join()
48
             th.join()
46
 
49
 
47
 
50