summaryrefslogtreecommitdiff
path: root/searx/search
diff options
context:
space:
mode:
authorAlexandre Flament <alex@al-f.net>2021-04-17 18:15:50 +0200
committerAlexandre Flament <alex@al-f.net>2021-04-21 16:24:46 +0200
commitc27fef1cdeeebcc17e21dbdc3dafad00de08a2ce (patch)
tree06cf169c03f07cfadd4462c988c33a2f63703f51 /searx/search
parent7acd7ffc02d14d175ec2a99ba984e47d8cb65d7d (diff)
downloadsearxng-c27fef1cdeeebcc17e21dbdc3dafad00de08a2ce.tar.gz
searxng-c27fef1cdeeebcc17e21dbdc3dafad00de08a2ce.zip
[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.
Diffstat (limited to 'searx/search')
-rw-r--r--searx/search/processors/online.py3
1 files changed, 2 insertions, 1 deletions
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