refactor(search): import REQUEST_TIMEOUT from constants in providers.py (#4331)
providers.py redefined REQUEST_TIMEOUT = 20 locally, shadowing the same value in src/constants.py and risking drift if the constant is bumped. Import it from src.constants and drop the local copy; same value, one source of truth. Closes #4329
This commit is contained in:
parent
5bafc30622
commit
2fab378c6a
1 changed files with 1 additions and 3 deletions
|
|
@ -9,14 +9,12 @@ from urllib.parse import urljoin, urlparse, parse_qs
|
||||||
import httpx
|
import httpx
|
||||||
from bs4 import BeautifulSoup
|
from bs4 import BeautifulSoup
|
||||||
|
|
||||||
from src.constants import SEARXNG_INSTANCE
|
from src.constants import SEARXNG_INSTANCE, REQUEST_TIMEOUT
|
||||||
from .analytics import RateLimitError, error_logger
|
from .analytics import RateLimitError, error_logger
|
||||||
from .query import build_enhanced_query
|
from .query import build_enhanced_query
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
REQUEST_TIMEOUT = 20
|
|
||||||
|
|
||||||
# Provider registry — maps setting value to (label, needs_key, needs_url)
|
# Provider registry — maps setting value to (label, needs_key, needs_url)
|
||||||
PROVIDER_INFO = {
|
PROVIDER_INFO = {
|
||||||
"searxng": ("SearXNG", False, True),
|
"searxng": ("SearXNG", False, True),
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue