forked from zaclys/searxng
[fix] /stats: report error percentage instead of error count
This bug exists since the PR https://github.com/searx/searx/pull/751
This commit is contained in:
parent
b7f1a8424a
commit
3cfef61123
|
@ -72,7 +72,7 @@ def load_engine(engine_data):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
engine = load_module(engine_module + '.py', engine_dir)
|
engine = load_module(engine_module + '.py', engine_dir)
|
||||||
except (SyntaxError, KeyboardInterrupt, SystemExit, SystemError, ImportError, RuntimeError) as e:
|
except (SyntaxError, KeyboardInterrupt, SystemExit, SystemError, ImportError, RuntimeError):
|
||||||
logger.exception('Fatal exception in engine "{}"'.format(engine_module))
|
logger.exception('Fatal exception in engine "{}"'.format(engine_module))
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
except:
|
except:
|
||||||
|
@ -234,7 +234,7 @@ def get_engines_stats(preferences):
|
||||||
results = to_percentage(results, max_results)
|
results = to_percentage(results, max_results)
|
||||||
scores = to_percentage(scores, max_score)
|
scores = to_percentage(scores, max_score)
|
||||||
scores_per_result = to_percentage(scores_per_result, max_score_per_result)
|
scores_per_result = to_percentage(scores_per_result, max_score_per_result)
|
||||||
erros = to_percentage(errors, max_errors)
|
errors = to_percentage(errors, max_errors)
|
||||||
|
|
||||||
return [
|
return [
|
||||||
(
|
(
|
||||||
|
|
Loading…
Reference in New Issue