summaryrefslogtreecommitdiff
path: root/redis/asyncio/retry.py
diff options
context:
space:
mode:
Diffstat (limited to 'redis/asyncio/retry.py')
-rw-r--r--redis/asyncio/retry.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/redis/asyncio/retry.py b/redis/asyncio/retry.py
index 0934ad0..7c5e3b0 100644
--- a/redis/asyncio/retry.py
+++ b/redis/asyncio/retry.py
@@ -35,6 +35,14 @@ class Retry:
self._retries = retries
self._supported_errors = supported_errors
+ def update_supported_errors(self, specified_errors: list):
+ """
+ Updates the supported errors with the specified error types
+ """
+ self._supported_errors = tuple(
+ set(self._supported_errors + tuple(specified_errors))
+ )
+
async def call_with_retry(
self, do: Callable[[], Awaitable[T]], fail: Callable[[RedisError], Any]
) -> T: