Skip to content
This repository has been archived by the owner on Feb 21, 2023. It is now read-only.

Commit

Permalink
fix timeout passing in pool
Browse files Browse the repository at this point in the history
  • Loading branch information
popravich committed Jun 21, 2017
1 parent 201451d commit b2cfb7b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions aioredis/commands/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ def select(self, db):
@asyncio.coroutine
def create_redis(address, *, db=None, password=None, ssl=None,
encoding=None, commands_factory=Redis,
timeout=None,
loop=None):
"""Creates high-level Redis interface.
Expand All @@ -143,6 +144,7 @@ def create_redis(address, *, db=None, password=None, ssl=None,
password=password,
ssl=ssl,
encoding=encoding,
timeout=timeout,
loop=loop)
return commands_factory(conn)

Expand Down
2 changes: 1 addition & 1 deletion aioredis/commands/sorted_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ def zrevrangebylex(self, key, min=b'-', max=b'+', include_min=True,
if offset is not None and count is not None:
args.extend([b'LIMIT', offset, count])

return self.execute(b'ZREVRANGEBYLEX', key, max, min, *args)
return self._conn.execute(b'ZREVRANGEBYLEX', key, max, min, *args)

def zrevrank(self, key, member):
"""Determine the index of a member in a sorted set, with
Expand Down
2 changes: 1 addition & 1 deletion aioredis/pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,14 +260,14 @@ def _fill_free(self, *, override_min):
# connection may be closed at yield point
self._drop_closed()

@asyncio.coroutine
def _create_new_connection(self):
return create_redis(self._address,
db=self._db,
password=self._password,
ssl=self._ssl,
encoding=self._encoding,
commands_factory=self._factory,
timeout=self._create_connection_timeout,
loop=self._loop)

@asyncio.coroutine
Expand Down

0 comments on commit b2cfb7b

Please sign in to comment.