Skip to content

Commit 0b01cba

Browse files
committed
Revert "[hotfix] interim fix to get docker-build of CI without issues"
This reverts interim fix from commit 50c4b58 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] [1] redis/redis-py#1869 [2] redis/redis-py@1fc1233f [3] redis/redis-py#1854 Signed-off-by: Markus Heiser <[email protected]>
1 parent 96ab5e5 commit 0b01cba

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ 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.1

searx/shared/redisdb.py

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

2222
import logging
23+
import redis
2324
from searx import get_setting
2425

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

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

3938

4039
def init():
41-
import redis # pylint: disable=import-error, import-outside-toplevel
42-
4340
try:
4441
c = client()
4542
logger.info("connected redis DB --> %s", c.acl_whoami())

0 commit comments

Comments
 (0)