mirror of
https://github.com/searxng/searxng.git
synced 2025-08-03 02:22:22 +02: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
|
@ -4,6 +4,7 @@ import typing
|
|||
import types
|
||||
import functools
|
||||
import itertools
|
||||
import threading
|
||||
from time import time
|
||||
from urllib.parse import urlparse
|
||||
|
||||
|
@ -377,6 +378,8 @@ class Checker:
|
|||
engineref_category = search_query.engineref_list[0].category
|
||||
params = self.processor.get_params(search_query, engineref_category)
|
||||
if params is not None:
|
||||
with threading.RLock():
|
||||
self.processor.engine.stats['sent_search_count'] += 1
|
||||
self.processor.search(search_query.query, params, result_container, time(), 5)
|
||||
return result_container
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue