Skip to content

Commit e74b0f6

Browse files
author
Matt George
committed
using correct api from redis-py
1 parent 1e2bf45 commit e74b0f6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pyres/__init__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,8 @@ class ResQ(object):
140140
141141
"""
142142
def __init__(self, server="localhost:6379", password=None):
143+
self.password = password
143144
self.redis = server
144-
if password:
145-
self.redis.auth(password)
146145
self._watched_queues = set()
147146

148147
def push(self, queue, item):
@@ -187,7 +186,7 @@ def _set_redis(self, server):
187186
if isinstance(server, basestring):
188187
self.dsn = server
189188
host, port = server.split(':')
190-
self._redis = Redis(host=host, port=int(port))
189+
self._redis = Redis(host=host, port=int(port), password=self.password)
191190
self.host = host
192191
self.port = int(port)
193192
elif isinstance(server, Redis):

0 commit comments

Comments
 (0)