mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
[fix] checker: fix engine statistics
Without this commit, the URL /stats/errors shows percentage above 100% after the checker has run.
This commit is contained in:
parent
ca76f3119a
commit
d473407ec9
3 changed files with 7 additions and 4 deletions
|
|
@ -53,9 +53,9 @@ def add_error_context(engine_name: str, error_context: ErrorContext) -> None:
|
|||
def get_trace(traces):
|
||||
for trace in reversed(traces):
|
||||
split_filename = trace.filename.split('/')
|
||||
if len(split_filename) > 3 and '/'.join(split_filename[-3:-1]) == 'searx/engines':
|
||||
if '/'.join(split_filename[-3:-1]) == 'searx/engines':
|
||||
return trace
|
||||
if len(split_filename) > 3 and '/'.join(split_filename[-4:-1]) == 'searx/search/processors':
|
||||
if '/'.join(split_filename[-4:-1]) == 'searx/search/processors':
|
||||
return trace
|
||||
return traces[-1]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue