File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -13,3 +13,4 @@ uvloop==0.16.0
13
13
httpx-socks [asyncio ]== 0.7.2
14
14
langdetect == 1.0.9
15
15
setproctitle == 1.2.2
16
+ redis == 4.1.1
Original file line number Diff line number Diff line change 20
20
"""
21
21
22
22
import logging
23
+ import redis
23
24
from searx import get_setting
24
25
25
26
logger = logging .getLogger ('searx.shared.redis' )
28
29
29
30
def client ():
30
31
global _client # pylint: disable=global-statement
31
- import redis # pylint: disable=import-error, import-outside-toplevel
32
-
33
32
if _client is None :
34
33
# not thread safe: in the worst case scenario, two or more clients are
35
34
# initialized only one is kept, the others are garbage collected.
@@ -38,8 +37,6 @@ def client():
38
37
39
38
40
39
def init ():
41
- import redis # pylint: disable=import-error, import-outside-toplevel
42
-
43
40
try :
44
41
c = client ()
45
42
logger .info ("connected redis DB --> %s" , c .acl_whoami ())
You can’t perform that action at this time.
0 commit comments