1818from celery .utils .time import humanize_seconds
1919from kombu .utils .objects import cached_property
2020from kombu .utils .url import maybe_sanitize_url
21- from redis . client import StrictRedis
21+ from redis import Redis
2222from redis .sentinel import MasterNotFoundError , Sentinel
2323from tenacity import retry , retry_if_exception_type , stop_after_delay , wait_exponential
2424
@@ -148,9 +148,9 @@ def get_redis(app=None):
148148 if isinstance (conf .redis_use_ssl , dict ):
149149 ssl_options .update (conf .redis_use_ssl )
150150 extras = {"decode_responses" : True , ** ssl_options , ** redis_options }
151- connection = StrictRedis .from_url (conf .redis_url , ** extras )
151+ connection = Redis .from_url (conf .redis_url , ** extras )
152152 elif conf .redis_url .startswith ('redis-cluster' ):
153- from rediscluster import RedisCluster
153+ from redis . cluster import RedisCluster
154154
155155 if not redis_options .get ('startup_nodes' ):
156156 startup_nodes_options = {'startup_nodes' : [{"host" : "localhost" , "port" : "30001" }]}
@@ -159,7 +159,7 @@ def get_redis(app=None):
159159 connection = RedisCluster (** redis_options )
160160 else :
161161 redis_options .update ({"decode_responses" : True })
162- connection = StrictRedis .from_url (conf .redis_url , ** redis_options )
162+ connection = Redis .from_url (conf .redis_url , ** redis_options )
163163
164164 if connection :
165165 _set_redbeat_connect (app , REDBEAT_REDIS_KEY , connection , retry_period )
0 commit comments