summaryrefslogtreecommitdiff
path: root/redis/client.py
diff options
context:
space:
mode:
Diffstat (limited to 'redis/client.py')
-rwxr-xr-xredis/client.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/redis/client.py b/redis/client.py
index 8356ba7..ed857c8 100755
--- a/redis/client.py
+++ b/redis/client.py
@@ -26,6 +26,7 @@ from redis.exceptions import (
WatchError,
)
from redis.lock import Lock
+from redis.retry import Retry
from redis.utils import safe_str, str_if_bytes
SYM_EMPTY = b""
@@ -1047,6 +1048,13 @@ class Redis(AbstractRedis, RedisModuleCommands, CoreCommands, SentinelCommands):
"""Get the connection's key-word arguments"""
return self.connection_pool.connection_kwargs
+ def get_retry(self) -> Optional["Retry"]:
+ return self.get_connection_kwargs().get("retry")
+
+ def set_retry(self, retry: "Retry") -> None:
+ self.get_connection_kwargs().update({"retry": retry})
+ self.connection_pool.set_retry(retry)
+
def set_response_callback(self, command, callback):
"""Set a custom Response Callback"""
self.response_callbacks[command] = callback