summaryrefslogtreecommitdiff
path: root/searx/webapp.py
diff options
context:
space:
mode:
authorAlexandre Flament <alex@al-f.net>2021-04-13 15:21:53 +0200
committerAlexandre Flament <alex@al-f.net>2021-04-21 16:24:46 +0200
commitaae7830d14242ac1f98232f428654c5d2c9c5eb2 (patch)
tree83df1950b7b5889fb17eda740a095022a816642e /searx/webapp.py
parentae5954f2dad0386868709a59a1b29d005ebb2b2d (diff)
[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)
Diffstat (limited to 'searx/webapp.py')
-rwxr-xr-xsearx/webapp.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/searx/webapp.py b/searx/webapp.py
index c3cd38ae8..e248b9d27 100755
--- a/searx/webapp.py
+++ b/searx/webapp.py
@@ -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