Skip to content

Commit b66e99c

Browse files
committed
Applying review comments - removing unused methods from retry objects, updating pydocs of error handler method
1 parent 040e647 commit b66e99c

File tree

3 files changed

+1
-22
lines changed

3 files changed

+1
-22
lines changed

redis/asyncio/client.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -949,10 +949,7 @@ async def connect(self):
949949

950950
async def _reconnect(self, conn):
951951
"""
952-
Close the connection and raise an exception
953-
if retry_on_error is not set or the error is not one
954-
of the specified error types. Otherwise, try to
955-
reconnect
952+
Try to reconnect
956953
"""
957954
await conn.disconnect()
958955
await conn.connect()

redis/asyncio/retry.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,6 @@ def update_supported_errors(self, specified_errors: list):
4343
set(self._supported_errors + tuple(specified_errors))
4444
)
4545

46-
def get_retries_count(self) -> int:
47-
"""
48-
Returns the current retries count
49-
"""
50-
return self._retries
51-
52-
def update_retries_count(self, retries: int) -> None:
53-
"""
54-
Updates the retries count with the specified value
55-
"""
56-
self._retries = retries
57-
5846
async def call_with_retry(
5947
self, do: Callable[[], Awaitable[T]], fail: Callable[[RedisError], Any]
6048
) -> T:

redis/retry.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,6 @@ def update_supported_errors(
4444
set(self._supported_errors + tuple(specified_errors))
4545
)
4646

47-
def update_retries_count(self, retries: int) -> None:
48-
"""
49-
Updates the retries count with the specified value
50-
"""
51-
self._retries = retries
52-
5347
def call_with_retry(
5448
self,
5549
do: Callable[[], T],

0 commit comments

Comments
 (0)