diff options
| author | Alexandre Flament <alex@al-f.net> | 2022-01-22 15:56:15 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-22 15:56:15 +0100 |
| commit | f01ddd19327cc017fe3f813868c7f20da3831edb (patch) | |
| tree | 20238a37537d00c1c7b4e69564733d699fb3f96d /searx/shared | |
| parent | f3d4b25e739164ea6af087379536b3ef3538d63c (diff) | |
| parent | e85744c2543136fdb1efd1a3d924f381ddadb490 (diff) | |
Merge pull request #775 from return42/redis-4.1.1
Revert "[hotfix] interim fix to get docker-build of CI without issues"
Diffstat (limited to 'searx/shared')
| -rw-r--r-- | searx/shared/redisdb.py | 5 |
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()) |