summaryrefslogtreecommitdiff
path: root/searx/webapp.py
diff options
context:
space:
mode:
authorAlexandre Flament <alex@al-f.net>2021-12-26 22:44:46 +0100
committerAlexandre Flament <alex@al-f.net>2022-01-05 19:03:04 +0100
commit2134703b4bb9847d0efeac3b28ceefb7d1f26271 (patch)
tree054d617ef416a552749cf1cf7761d45f12f348b3 /searx/webapp.py
parenta7199bc08552fbd3a8cf8b257aeded5b26591afb (diff)
[enh] settings.yml: implement general.enable_metrics
* allow not to record metrics (response time, etc...) * this commit doesn't change the UI. If the metrics are disabled /stats and /stats/errors will return empty response. in /preferences, the columns response time and reliability will be empty.
Diffstat (limited to 'searx/webapp.py')
-rwxr-xr-xsearx/webapp.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/searx/webapp.py b/searx/webapp.py
index a2aa84d9d..410c005cb 100755
--- a/searx/webapp.py
+++ b/searx/webapp.py
@@ -1333,7 +1333,7 @@ werkzeug_reloader = flask_run_development or (searx_debug and __name__ == "__mai
# initialize the engines except on the first run of the werkzeug server.
if not werkzeug_reloader or (werkzeug_reloader and os.environ.get("WERKZEUG_RUN_MAIN") == "true"):
plugin_initialize(app)
- search_initialize(enable_checker=True, check_network=True)
+ search_initialize(enable_checker=True, check_network=True, enable_metrics=settings['general']['enable_metrics'])
def run():