diff options
| author | Andy McCurdy <andy@andymccurdy.com> | 2013-11-26 18:53:44 -0800 |
|---|---|---|
| committer | Andy McCurdy <andy@andymccurdy.com> | 2013-11-26 18:53:44 -0800 |
| commit | d569b46a3026b9c5d44868cc744ceb86f2b78a73 (patch) | |
| tree | d173b9af808723073f758b1b9420f343052b443b | |
| parent | a75d33b012e172b03e94bfeaba89243675ddea4a (diff) | |
| parent | 5be75fc3ffdf95677ecfc13f7c937a6dd3613ed9 (diff) | |
| download | redis-py-d569b46a3026b9c5d44868cc744ceb86f2b78a73.tar.gz | |
Merge branch 'pr/391'
| -rw-r--r-- | redis/connection.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/redis/connection.py b/redis/connection.py index 03d9d2b..9127b13 100644 --- a/redis/connection.py +++ b/redis/connection.py @@ -395,11 +395,20 @@ 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, **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 |
