summaryrefslogtreecommitdiff
path: root/searx/search.py
diff options
context:
space:
mode:
authorNoémi Ványi <kvch@users.noreply.github.com>2018-08-19 21:49:07 +0200
committerGitHub <noreply@github.com>2018-08-19 21:49:07 +0200
commit8f744ddfb27188ca0a615916bfb8df0c3b56819f (patch)
tree8e1ec20da83142b3cec496adab006c2b9b5dca47 /searx/search.py
parentc2da901afab28cc13794511709f70a0c76edc659 (diff)
parentc5c812899f737082f65d0726fbc0ad21501e09e7 (diff)
Merge branch 'master' into patch-2
Diffstat (limited to 'searx/search.py')
-rw-r--r--searx/search.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/searx/search.py b/searx/search.py
index 945f32197..950a49f23 100644
--- a/searx/search.py
+++ b/searx/search.py
@@ -147,7 +147,8 @@ def search_one_request_safe(engine_name, query, request_params, result_container
if requests_exception:
# update continuous_errors / suspend_end_time
engine.continuous_errors += 1
- engine.suspend_end_time = time() + min(60, engine.continuous_errors)
+ engine.suspend_end_time = time() + min(settings['search']['max_ban_time_on_fail'],
+ engine.continuous_errors * settings['search']['ban_time_on_fail'])
else:
# no HTTP error (perhaps an engine error)
# anyway, reset the suspend variables