diff options
author | Alexandre Flament <alex@al-f.net> | 2021-06-01 08:07:26 +0200 |
---|---|---|
committer | Alexandre Flament <alex@al-f.net> | 2021-06-01 08:10:15 +0200 |
commit | 6fa114c9ba0f9e20168754dd4cbd03e5defef631 (patch) | |
tree | 680fbda0bcf0a405c96f081139fb999aff752af9 /searx/search | |
parent | 4b07df62e5906e98315e9e856db8f39b2f28f36e (diff) | |
download | searxng-6fa114c9ba0f9e20168754dd4cbd03e5defef631.tar.gz searxng-6fa114c9ba0f9e20168754dd4cbd03e5defef631.zip |
[mod] settings_default: remove searx.search.max_request_timeout global variable
Diffstat (limited to 'searx/search')
-rw-r--r-- | searx/search/__init__.py | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/searx/search/__init__.py b/searx/search/__init__.py index 49a98825c..041a54c4b 100644 --- a/searx/search/__init__.py +++ b/searx/search/__init__.py @@ -23,17 +23,6 @@ from searx.search.checker import initialize as initialize_checker logger = logger.getChild('search') -max_request_timeout = settings.get('outgoing', {}).get('max_request_timeout' or None) -if max_request_timeout is None: - logger.info('max_request_timeout={0}'.format(max_request_timeout)) -else: - if isinstance(max_request_timeout, float): - logger.info('max_request_timeout={0} second(s)'.format(max_request_timeout)) - else: - logger.critical('outgoing.max_request_timeout if defined has to be float') - import sys - sys.exit(1) - def initialize(settings_engines=None, enable_checker=False): settings_engines = settings_engines or settings['engines'] @@ -115,6 +104,7 @@ class Search: default_timeout = max(default_timeout, processor.engine.timeout) # adjust timeout + max_request_timeout = settings['outgoing']['max_request_timeout'] actual_timeout = default_timeout query_timeout = self.search_query.timeout_limit |