|
@@ -15,14 +15,14 @@ along with searx. If not, see < http://www.gnu.org/licenses/ >.
|
15
|
15
|
(C) 2013- by Adam Tauber, <asciimoo@gmail.com>
|
16
|
16
|
'''
|
17
|
17
|
|
|
18
|
+import gc
|
18
|
19
|
import threading
|
19
|
|
-import searx.poolrequests as requests_lib
|
|
20
|
+from thread import start_new_thread
|
20
|
21
|
from time import time
|
21
|
|
-from searx import settings
|
|
22
|
+import searx.poolrequests as requests_lib
|
22
|
23
|
from searx.engines import (
|
23
|
24
|
categories, engines
|
24
|
25
|
)
|
25
|
|
-from searx.languages import language_codes
|
26
|
26
|
from searx.utils import gen_useragent
|
27
|
27
|
from searx.query import Query
|
28
|
28
|
from searx.results import ResultContainer
|
|
@@ -347,6 +347,7 @@ class Search(object):
|
347
|
347
|
return self
|
348
|
348
|
# send all search-request
|
349
|
349
|
threaded_requests(requests)
|
|
350
|
+ start_new_thread(gc.collect, tuple())
|
350
|
351
|
|
351
|
352
|
# return results, suggestions, answers and infoboxes
|
352
|
353
|
return self
|