mirror of
https://github.com/searxng/searxng.git
synced 2025-12-23 20:20:05 +00:00
[mod] refactoring: processors
Report to the user suspended engines. searx.search.processor.abstract: * manages suspend time (per network). * reports suspended time to the ResultContainer (method extend_container_if_suspended) * adds the results to the ResultContainer (method extend_container) * handles exceptions (method handle_exception)
This commit is contained in:
@@ -764,6 +764,8 @@ def __get_translated_errors(unresponsive_engines):
|
||||
error_msg = gettext(unresponsive_engine[1])
|
||||
if unresponsive_engine[2]:
|
||||
error_msg = "{} {}".format(error_msg, unresponsive_engine[2])
|
||||
if unresponsive_engine[3]:
|
||||
error_msg = gettext('Suspended') + ': ' + error_msg
|
||||
translated_errors.add((unresponsive_engine[0], error_msg))
|
||||
return translated_errors
|
||||
|
||||
|
||||
Reference in New Issue
Block a user