Parcourir la source

[mod] search thread names

Adam Tauber il y a 10 ans
Parent
révision
8e6ae188b8
1 fichiers modifiés avec 5 ajouts et 2 suppressions
  1. 5
    2
      searx/search.py

+ 5
- 2
searx/search.py Voir le fichier

@@ -36,12 +36,15 @@ number_of_searches = 0
36 36
 def threaded_requests(requests):
37 37
     for fn, url, request_args in requests:
38 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 44
         th.start()
42 45
 
43 46
     for th in threading.enumerate():
44
-        if th.name.startswith('http'):
47
+        if th.name == 'search_request':
45 48
             th.join()
46 49
 
47 50