mirror of
https://github.com/searxng/searxng.git
synced 2025-08-02 10:02:20 +02: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:
parent
ae5954f2da
commit
aae7830d14
9 changed files with 143 additions and 125 deletions
|
@ -369,9 +369,9 @@ class ResultContainer:
|
|||
return 0
|
||||
return resultnum_sum / len(self._number_of_results)
|
||||
|
||||
def add_unresponsive_engine(self, engine_name, error_type, error_message=None):
|
||||
def add_unresponsive_engine(self, engine_name, error_type, error_message=None, suspended=False):
|
||||
if engines[engine_name].display_error_messages:
|
||||
self.unresponsive_engines.add((engine_name, error_type, error_message))
|
||||
self.unresponsive_engines.add((engine_name, error_type, error_message, suspended))
|
||||
|
||||
def add_timing(self, engine_name, engine_time, page_load_time):
|
||||
self.timings.append({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue