mirror of
https://github.com/searxng/searxng.git
synced 2025-12-22 19:50:00 +00: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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user