From f680a34dc25ba7a78125d317087e9c2dd10963ba Mon Sep 17 00:00:00 2001 From: Mark LaPerriere Date: Fri, 18 May 2012 00:41:57 -0300 Subject: [PATCH 1/2] Fix typo in client.punsubscribe - was sending cmd 'UNSUBSCRIBE' - should be sending command 'PUNSUBSCRIBE' --- brukva/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/brukva/client.py b/brukva/client.py index 45bcd9a..7dbf80f 100644 --- a/brukva/client.py +++ b/brukva/client.py @@ -889,7 +889,7 @@ def unsubscribe(self, channels, callbacks=None): self._unsubscribe('UNSUBSCRIBE', channels, callbacks) def punsubscribe(self, channels, callbacks=None): - self._unsubscribe('UNSUBSCRIBE', channels, callbacks) + self._unsubscribe('PUNSUBSCRIBE', channels, callbacks) def _unsubscribe(self, cmd, channels, callbacks=None): callbacks = callbacks or [] From 2802b16a858d5480190a70901d27d746ed09ff59 Mon Sep 17 00:00:00 2001 From: Mark LaPerriere Date: Fri, 18 May 2012 00:46:02 -0300 Subject: [PATCH 2/2] Update brukva/client.py --- brukva/client.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/brukva/client.py b/brukva/client.py index 7dbf80f..0917265 100644 --- a/brukva/client.py +++ b/brukva/client.py @@ -304,10 +304,11 @@ def __getattr__(self, item): class Client(object): def __init__(self, host='localhost', port=6379, password=None, - selected_db=None, io_loop=None): + selected_db=None, io_loop=None, connect_timeout=None): self._io_loop = io_loop or IOLoop.instance() self.connection = Connection(host, port, - self.on_connect, self.on_disconnect, io_loop=self._io_loop) + self.on_connect, self.on_disconnect, timeout=connect_timeout, + io_loop=self._io_loop) self.async = _AsyncWrapper(weakref.proxy(self)) self.queue = [] self.current_cmd_line = None