summaryrefslogtreecommitdiff
path: root/searx/shared
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2022-01-12 09:17:03 +0100
committerMarkus Heiser <markus.heiser@darmarit.de>2022-01-12 09:31:12 +0100
commit50c4b58db652f4ed5b257bd758d54286e743d97f (patch)
treed0a32b1a53f8d0be7de666e5f20f2c14394ed56d /searx/shared
parent7f0fe265797e1fa84526951532d6f74f6cdcdbc0 (diff)
downloadsearxng-50c4b58db652f4ed5b257bd758d54286e743d97f.tar.gz
searxng-50c4b58db652f4ed5b257bd758d54286e743d97f.zip
[hotfix] interim fix to get docker-build of CI without issues
There is an issue with redis v4.1.0 [1] / for the interim lets remove this python dependency. [1] https://github.com/searxng/searxng/issues/741 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searx/shared')
-rw-r--r--searx/shared/redisdb.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/searx/shared/redisdb.py b/searx/shared/redisdb.py
index da71d169c..d6a4dc3bf 100644
--- a/searx/shared/redisdb.py
+++ b/searx/shared/redisdb.py
@@ -20,7 +20,6 @@ A redis DB connect can be tested by::
"""
import logging
-import redis
from searx import get_setting
logger = logging.getLogger('searx.shared.redis')
@@ -29,6 +28,8 @@ _client = None
def client():
global _client # pylint: disable=global-statement
+ import redis # pylint: disable=import-error, import-outside-toplevel
+
if _client is None:
# not thread safe: in the worst case scenario, two or more clients are
# initialized only one is kept, the others are garbage collected.
@@ -37,6 +38,8 @@ def client():
def init():
+ import redis # pylint: disable=import-error, import-outside-toplevel
+
try:
c = client()
logger.info("connected redis DB --> %s", c.acl_whoami())