Skip to content

Commit 360f3a8

Browse files
committed
def cleanup in base class
1 parent 7b27099 commit 360f3a8

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

redis/asyncio/connection.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,12 +1057,15 @@ class ConnectionPool:
10571057
``connection_class``.
10581058
"""
10591059

1060-
@abstractmethod
10611060
def cleanup(self, **options):
10621061
"""
10631062
Additional cleanup operations that the connection pool might
1064-
need to do after a SCAN ITER family command is executed
1063+
need to do after a SCAN ITER family command is executed.
1064+
1065+
See SentinelManagedConnection for an example cleanup operation that
1066+
might need to be done.
10651067
"""
1068+
pass
10661069

10671070
@classmethod
10681071
def from_url(cls: Type[_CP], url: str, **kwargs) -> _CP:

redis/connection.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1156,6 +1156,16 @@ def __repr__(self) -> (str, str):
11561156
f"({repr(self.connection_class(**self.connection_kwargs))})>"
11571157
)
11581158

1159+
def cleanup(self, **options):
1160+
"""
1161+
Additional cleanup operations that the connection pool might
1162+
need to do after a SCAN ITER family command is executed.
1163+
1164+
See SentinelManagedConnection for an example cleanup operation that
1165+
might need to be done.
1166+
"""
1167+
pass
1168+
11591169
def reset(self) -> None:
11601170
self._lock = threading.Lock()
11611171
self._created_connections = 0

0 commit comments

Comments
 (0)