1
0
mirror of https://github.com/searxng/searxng.git synced 2024-11-22 20:17:45 +01:00

Merge pull request #775 from return42/redis-4.1.1

Revert "[hotfix] interim fix to get docker-build of CI without issues"
This commit is contained in:
Alexandre Flament 2022-01-22 15:56:15 +01:00 committed by GitHub
commit f01ddd1932
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 4 deletions

View File

@ -13,3 +13,4 @@ uvloop==0.16.0
httpx-socks[asyncio]==0.7.2
langdetect==1.0.9
setproctitle==1.2.2
redis==4.1.1

View File

@ -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())