소스 검색

[mod] search thread names

Adam Tauber 10 년 전
부모
커밋
8e6ae188b8
1개의 변경된 파일5개의 추가작업 그리고 2개의 파일을 삭제
  1. 5
    2
      searx/search.py

+ 5
- 2
searx/search.py 파일 보기

@@ -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