Skip to content

Commit cbd5c78

Browse files
committed
support auth password
1 parent 5c6e8e6 commit cbd5c78

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/pyres/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@ def str_to_class(s):
1818

1919
class ResQ(object):
2020

21-
def __init__(self, server="localhost:6379"):
21+
def __init__(self, server="localhost:6379", password=None):
2222
self.redis = server
23+
if password:
24+
self.redis.auth(password)
2325
self._watched_queues = set()
2426

2527
def push(self, queue, item):

0 commit comments

Comments
 (0)