This commit is contained in:
Ivan Gabaldon
2026-09-01 21:46:00 +02:00
parent aee33412aa
commit 401d7f9f51
85 changed files with 48 additions and 73 deletions

View File

@@ -1,6 +1,7 @@
#!/usr/bin/env python
# SPDX-License-Identifier: AGPL-3.0-or-later
"""WebApp"""
# pylint: disable=use-dict-literal
import json
@@ -118,7 +119,6 @@ from searx.sxng_locales import sxng_locales
import searx.search
from searx.network import stream as http_stream, set_context_network_name
logger = logger.getChild('webapp')
warnings.simplefilter("always")
@@ -1119,17 +1119,13 @@ def stats():
technical_report = []
for error in engine_reliabilities.get(selected_engine_name, {}).get('errors', []):
technical_report.append(
f"\
technical_report.append(f"\
Error: {error['exception_classname'] or error['log_message']} \
Parameters: {error['log_parameters']} \
File name: {error['filename'] }:{ error['line_no'] } \
Error Function: {error['function']} \
Code: {error['code']} \
".replace(
' ' * 12, ''
).strip()
)
".replace(' ' * 12, '').strip())
technical_report = ' '.join(technical_report)
engine_stats['time'] = sorted(engine_stats['time'], reverse=reverse, key=get_key)