From c27fef1cdeeebcc17e21dbdc3dafad00de08a2ce Mon Sep 17 00:00:00 2001 From: Alexandre Flament Date: Sat, 17 Apr 2021 18:15:50 +0200 Subject: [mod] metrics: add secondary parameter Some error won't stop the engine: * additional HTTP redirects for example * some invalid results secondary=True allows to flag these errors as not important. --- searx/search/processors/online.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'searx/search') diff --git a/searx/search/processors/online.py b/searx/search/processors/online.py index bca74b746..c39937023 100644 --- a/searx/search/processors/online.py +++ b/searx/search/processors/online.py @@ -92,7 +92,8 @@ class OnlineProcessor(EngineProcessor): hostname = response.url.host count_error(self.engine_name, '{} redirects, maximum: {}'.format(len(response.history), soft_max_redirects), - (status_code, reason, hostname)) + (status_code, reason, hostname), + secondary=True) return response -- cgit v1.2.3