This commit is contained in:
Joseph Cheung 2023-03-08 00:40:29 +08:00
parent 188cac773e
commit 7f5fa15b8f
2 changed files with 16 additions and 16 deletions

View file

@ -831,15 +831,15 @@ def search():
# return index_error(output_format, gettext('No item found')), 500
results.remove(res)
except:pass
threads = []
for result in results:
t = threading.Thread(target=process_result, args=(result,))
t.start()
threads.append(t)
# threads = []
# for result in results:
# t = threading.Thread(target=process_result, args=(result,))
# t.start()
# threads.append(t)
# 等待所有线程执行完毕
for t in threads:
t.join()
# # 等待所有线程执行完毕
# for t in threads:
# t.join()
for res in results:
if 'engine' in res and res['engine'] == 'twitter':
try:

View file

@ -831,15 +831,15 @@ def search():
# return index_error(output_format, gettext('No item found')), 500
results.remove(res)
except:pass
threads = []
for result in results:
t = threading.Thread(target=process_result, args=(result,))
t.start()
threads.append(t)
# threads = []
# for result in results:
# t = threading.Thread(target=process_result, args=(result,))
# t.start()
# threads.append(t)
# 等待所有线程执行完毕
for t in threads:
t.join()
# # 等待所有线程执行完毕
# for t in threads:
# t.join()
for res in results:
if 'engine' in res and res['engine'] == 'twitter':
try: