mirror of
https://github.com/searxng/searxng.git
synced 2024-11-14 08:40:11 +01:00
[enh] handle engine response crashes
This commit is contained in:
parent
ceb8ae6439
commit
0205838f25
@ -118,7 +118,11 @@ def search_one_request(engine_name, query, request_params, result_container, tim
|
|||||||
if response:
|
if response:
|
||||||
# parse the response
|
# parse the response
|
||||||
response.search_params = request_params
|
response.search_params = request_params
|
||||||
search_results = engine.response(response)
|
try:
|
||||||
|
search_results = engine.response(response)
|
||||||
|
except:
|
||||||
|
logger.exception('engine crash: {0}'.format(engine.name))
|
||||||
|
search_results = []
|
||||||
|
|
||||||
# add results
|
# add results
|
||||||
for result in search_results:
|
for result in search_results:
|
||||||
@ -135,7 +139,6 @@ def search_one_request(engine_name, query, request_params, result_container, tim
|
|||||||
engine.stats['engine_time'] += time() - request_params['started']
|
engine.stats['engine_time'] += time() - request_params['started']
|
||||||
engine.stats['engine_time_count'] += 1
|
engine.stats['engine_time_count'] += 1
|
||||||
|
|
||||||
#
|
|
||||||
return success
|
return success
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user