mirror of
https://github.com/searxng/searxng.git
synced 2025-07-30 08:32:24 +02:00
[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.
This commit is contained in:
parent
a7199bc085
commit
2134703b4b
8 changed files with 35 additions and 11 deletions
|
@ -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():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue