diff options
| author | Alexandre Flament <alex@al-f.net> | 2021-04-14 17:23:15 +0200 |
|---|---|---|
| committer | Alexandre Flament <alex@al-f.net> | 2021-04-21 16:24:46 +0200 |
| commit | 7acd7ffc02d14d175ec2a99ba984e47d8cb65d7d (patch) | |
| tree | 000b6e4b0038ed627bb114f8a2de83681bbf7ad4 /searx/search/processors/online.py | |
| parent | aae7830d14242ac1f98232f428654c5d2c9c5eb2 (diff) | |
[enh] rewrite and enhance metrics
Diffstat (limited to 'searx/search/processors/online.py')
| -rw-r--r-- | searx/search/processors/online.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/searx/search/processors/online.py b/searx/search/processors/online.py index 1483897d6..bca74b746 100644 --- a/searx/search/processors/online.py +++ b/searx/search/processors/online.py @@ -10,7 +10,7 @@ from searx import logger from searx.utils import gen_useragent from searx.exceptions import (SearxEngineAccessDeniedException, SearxEngineCaptchaException, SearxEngineTooManyRequestsException,) -from searx.metrology.error_recorder import record_error +from searx.metrics.error_recorder import count_error from searx.search.processors.abstract import EngineProcessor @@ -90,9 +90,9 @@ class OnlineProcessor(EngineProcessor): status_code = str(response.status_code or '') reason = response.reason_phrase or '' hostname = response.url.host - record_error(self.engine_name, - '{} redirects, maximum: {}'.format(len(response.history), soft_max_redirects), - (status_code, reason, hostname)) + count_error(self.engine_name, + '{} redirects, maximum: {}'.format(len(response.history), soft_max_redirects), + (status_code, reason, hostname)) return response |