Skip to content

Commit 50c4b58

Browse files
committed
[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] searxng#741 Signed-off-by: Markus Heiser <[email protected]>
1 parent 7f0fe26 commit 50c4b58

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,3 @@ uvloop==0.16.0
1313
httpx-socks[asyncio]==0.7.2
1414
langdetect==1.0.9
1515
setproctitle==1.2.2
16-
redis==4.1.0

searx/shared/redisdb.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
"""
2121

2222
import logging
23-
import redis
2423
from searx import get_setting
2524

2625
logger = logging.getLogger('searx.shared.redis')
@@ -29,6 +28,8 @@
2928

3029
def client():
3130
global _client # pylint: disable=global-statement
31+
import redis # pylint: disable=import-error, import-outside-toplevel
32+
3233
if _client is None:
3334
# not thread safe: in the worst case scenario, two or more clients are
3435
# initialized only one is kept, the others are garbage collected.
@@ -37,6 +38,8 @@ def client():
3738

3839

3940
def init():
41+
import redis # pylint: disable=import-error, import-outside-toplevel
42+
4043
try:
4144
c = client()
4245
logger.info("connected redis DB --> %s", c.acl_whoami())

0 commit comments

Comments
 (0)