forked from zaclys/searxng
[enh] new engine parameter: timeout
This commit is contained in:
parent
c1d7d30b8e
commit
5b2680be4b
|
@ -75,8 +75,12 @@ for engine_data in settings['engines']:
|
||||||
#engine.language_support = False
|
#engine.language_support = False
|
||||||
engine.language_support = True
|
engine.language_support = True
|
||||||
|
|
||||||
if not hasattr(engine, 'shortcut'):
|
if not hasattr(engine, 'timeout'):
|
||||||
#engine.language_support = False
|
#engine.language_support = False
|
||||||
|
engine.timeout = settings['server']['request_timeout']
|
||||||
|
|
||||||
|
if not hasattr(engine, 'shortcut'):
|
||||||
|
#engine.shortcut = '''
|
||||||
engine.shortcut = ''
|
engine.shortcut = ''
|
||||||
|
|
||||||
# checking required variables
|
# checking required variables
|
||||||
|
@ -219,7 +223,7 @@ def search(query, request, selected_engines, pageno=1, lang='all'):
|
||||||
headers=request_params['headers'],
|
headers=request_params['headers'],
|
||||||
hooks=dict(response=callback),
|
hooks=dict(response=callback),
|
||||||
cookies=request_params['cookies'],
|
cookies=request_params['cookies'],
|
||||||
timeout=settings['server']['request_timeout']
|
timeout=engine.timeout
|
||||||
)
|
)
|
||||||
|
|
||||||
if request_params['method'] == 'GET':
|
if request_params['method'] == 'GET':
|
||||||
|
|
Loading…
Reference in New Issue