From adab95a36832cee62b86af461e1165a21fc19982 Mon Sep 17 00:00:00 2001 From: Eric Urban Date: Mon, 21 Oct 2013 19:32:57 -0400 Subject: Update documentation on __init__ of ConnectionPool to explain usage and behavior --- redis/connection.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/redis/connection.py b/redis/connection.py index 8f667e1..565147f 100644 --- a/redis/connection.py +++ b/redis/connection.py @@ -383,6 +383,15 @@ class ConnectionPool(object): "Generic connection pool" def __init__(self, connection_class=Connection, max_connections=None, **connection_kwargs): + '''Create a connection pool. If max_connections is set, then this + object raises redis.ConnectionError when the pool's limit is reached. + + By default, TCP connections are created connection_class is specified. + Use redis.UnixDomainSocketConnection for unix sockets. + + Any additional keyword arguments are passed to the constructor of + connection_class. + ''' self.pid = os.getpid() self.connection_class = connection_class self.connection_kwargs = connection_kwargs -- cgit v1.2.1 From ad1305b7a0f811eefe277f5938235949f124e7c6 Mon Sep 17 00:00:00 2001 From: Eric Urban Date: Mon, 21 Oct 2013 19:33:25 -0400 Subject: remove TODO, it is implemented by BlockingConnectionPool without a timeout --- redis/connection.py | 1 - 1 file changed, 1 deletion(-) diff --git a/redis/connection.py b/redis/connection.py index 565147f..e111132 100644 --- a/redis/connection.py +++ b/redis/connection.py @@ -378,7 +378,6 @@ class UnixDomainSocketConnection(Connection): (exception.args[0], self.path, exception.args[1]) -# TODO: add ability to block waiting on a connection to be released class ConnectionPool(object): "Generic connection pool" def __init__(self, connection_class=Connection, max_connections=None, -- cgit v1.2.1 From 5be75fc3ffdf95677ecfc13f7c937a6dd3613ed9 Mon Sep 17 00:00:00 2001 From: Andy McCurdy Date: Tue, 26 Nov 2013 18:53:23 -0800 Subject: double quotes rather than singles --- redis/connection.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/redis/connection.py b/redis/connection.py index e111132..4db3c0c 100644 --- a/redis/connection.py +++ b/redis/connection.py @@ -382,15 +382,16 @@ class ConnectionPool(object): "Generic connection pool" def __init__(self, connection_class=Connection, max_connections=None, **connection_kwargs): - '''Create a connection pool. If max_connections is set, then this + """ + Create a connection pool. If max_connections is set, then this object raises redis.ConnectionError when the pool's limit is reached. - + By default, TCP connections are created connection_class is specified. Use redis.UnixDomainSocketConnection for unix sockets. - - Any additional keyword arguments are passed to the constructor of + + Any additional keyword arguments are passed to the constructor of connection_class. - ''' + """ self.pid = os.getpid() self.connection_class = connection_class self.connection_kwargs = connection_kwargs -- cgit v1.2.1