Description
redis sentinel channel lost health_check_interval in connparams
Reproduction
from kombu.connection import Connection
from kombu.utils.functional import accepts_argument
from redis import sentinel
conn_class = sentinel.SentinelManagedConnection
conn = Connection("sentinel://127.0.0.1:26379;sentinel://127.0.0.2:26379;sentinel://127.0.0.3:26379")
connparams = {"health_check_interval": 30}
if hasattr(conn_class, "__init__"):
# check health_check_interval for the class and bases
# classes
classes = [conn_class]
if hasattr(conn_class, "__bases__"):
classes += list(conn_class.__bases__)
for klass in classes:
if accepts_argument(klass.__init__, "health_check_interval"):
break
else: # no break
connparams.pop("health_check_interval")
assert "health_check_interval" in connparams
Suggestion
Latest Kombu require redis-py>=4.5.2 , and redis.connection.AbstractConnections already contains health_check_interval param.
So it looks like relative check could be removed.
Description
redis sentinel channel lost
health_check_intervalin connparamsReproduction
Suggestion
Latest Kombu require
redis-py>=4.5.2, and redis.connection.AbstractConnections already containshealth_check_intervalparam.So it looks like relative check could be removed.