diff options
author | Eric Urban <hydrogen18@gmail.com> | 2013-10-21 19:32:57 -0400 |
---|---|---|
committer | Eric Urban <hydrogen18@gmail.com> | 2013-10-21 19:32:57 -0400 |
commit | adab95a36832cee62b86af461e1165a21fc19982 (patch) | |
tree | b98aa67b6bc5e6a4b6ae37e3c61ffc29d8371492 | |
parent | bc782da7be1856faacfe30df9c8e6c737e0d2dc1 (diff) | |
download | redis-py-adab95a36832cee62b86af461e1165a21fc19982.tar.gz |
Update documentation on __init__ of ConnectionPool to explain usage and behavior
-rw-r--r-- | redis/connection.py | 9 |
1 files changed, 9 insertions, 0 deletions
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 |