mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
c
This commit is contained in:
parent
188cac773e
commit
7f5fa15b8f
2 changed files with 16 additions and 16 deletions
|
@ -831,15 +831,15 @@ def search():
|
||||||
# return index_error(output_format, gettext('No item found')), 500
|
# return index_error(output_format, gettext('No item found')), 500
|
||||||
results.remove(res)
|
results.remove(res)
|
||||||
except:pass
|
except:pass
|
||||||
threads = []
|
# threads = []
|
||||||
for result in results:
|
# for result in results:
|
||||||
t = threading.Thread(target=process_result, args=(result,))
|
# t = threading.Thread(target=process_result, args=(result,))
|
||||||
t.start()
|
# t.start()
|
||||||
threads.append(t)
|
# threads.append(t)
|
||||||
|
|
||||||
# 等待所有线程执行完毕
|
# # 等待所有线程执行完毕
|
||||||
for t in threads:
|
# for t in threads:
|
||||||
t.join()
|
# t.join()
|
||||||
for res in results:
|
for res in results:
|
||||||
if 'engine' in res and res['engine'] == 'twitter':
|
if 'engine' in res and res['engine'] == 'twitter':
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -831,15 +831,15 @@ def search():
|
||||||
# return index_error(output_format, gettext('No item found')), 500
|
# return index_error(output_format, gettext('No item found')), 500
|
||||||
results.remove(res)
|
results.remove(res)
|
||||||
except:pass
|
except:pass
|
||||||
threads = []
|
# threads = []
|
||||||
for result in results:
|
# for result in results:
|
||||||
t = threading.Thread(target=process_result, args=(result,))
|
# t = threading.Thread(target=process_result, args=(result,))
|
||||||
t.start()
|
# t.start()
|
||||||
threads.append(t)
|
# threads.append(t)
|
||||||
|
|
||||||
# 等待所有线程执行完毕
|
# # 等待所有线程执行完毕
|
||||||
for t in threads:
|
# for t in threads:
|
||||||
t.join()
|
# t.join()
|
||||||
for res in results:
|
for res in results:
|
||||||
if 'engine' in res and res['engine'] == 'twitter':
|
if 'engine' in res and res['engine'] == 'twitter':
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Add table
Reference in a new issue