summaryrefslogtreecommitdiff
path: root/searx/shared
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2022-01-17 17:19:41 +0100
committerMarkus Heiser <markus.heiser@darmarit.de>2022-01-17 18:03:29 +0100
commite85744c2543136fdb1efd1a3d924f381ddadb490 (patch)
tree1caa0f4a557e6c11befa9838aa80e649cc286725 /searx/shared
parent96ab5e57ff92aba4ab0fedeb4e5fbfa09e9fc2e2 (diff)
downloadsearxng-e85744c2543136fdb1efd1a3d924f381ddadb490.tar.gz
searxng-e85744c2543136fdb1efd1a3d924f381ddadb490.zip
Revert "[hotfix] interim fix to get docker-build of CI without issues"
This reverts interim fix from commit 50c4b58db and adds requirement `redis==4.1.1`. The interim fix was needed by Alpine images (Docker) [1] and has been fixed in commit [2] merged with the patch series from [3]. In redis-py version 4.1.1 this pach has been released on PyPi [4]. [1] https://github.com/redis/redis-py/issues/1869 [2] https://github.com/redis/redis-py/commit/1fc1233f [3] https://github.com/redis/redis-py/pull/1854 [4] https://github.com/redis/redis-py/issues/1880 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searx/shared')
-rw-r--r--searx/shared/redisdb.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/searx/shared/redisdb.py b/searx/shared/redisdb.py
index d6a4dc3bf..da71d169c 100644
--- a/searx/shared/redisdb.py
+++ b/searx/shared/redisdb.py
@@ -20,6 +20,7 @@ A redis DB connect can be tested by::
"""
import logging
+import redis
from searx import get_setting
logger = logging.getLogger('searx.shared.redis')
@@ -28,8 +29,6 @@ _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.
@@ -38,8 +37,6 @@ 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())