summaryrefslogtreecommitdiff
path: root/redis/client.py
diff options
context:
space:
mode:
authorRich Schumacher <rich@digg.com>2011-03-04 13:21:14 -0800
committerRich Schumacher <rich@digg.com>2011-03-04 13:21:14 -0800
commit8a49e60e11864023e12683837ff9ac41b9a0a781 (patch)
tree4a037c72855cb6abdcc0218d9045e5db67d20c38 /redis/client.py
parent89705f343adf2b57104e0d02935888bd7949833e (diff)
downloadredis-py-8a49e60e11864023e12683837ff9ac41b9a0a781.tar.gz
Add support for multiple keys in a single WATCH call
Diffstat (limited to 'redis/client.py')
-rw-r--r--redis/client.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/redis/client.py b/redis/client.py
index 289f120..3f3617c 100644
--- a/redis/client.py
+++ b/redis/client.py
@@ -592,14 +592,14 @@ class Redis(threading.local):
"Returns the type of key ``name``"
return self.execute_command('TYPE', name)
- def watch(self, name):
+ def watch(self, *names):
"""
- Watches the value at key ``name``, or None of the key doesn't exist
+ Watches the values at keys ``names``, or None if the key doesn't exist
"""
if self.subscribed:
raise RedisError("Can't call 'watch' from a pipeline'")
- return self.execute_command('WATCH', name)
+ return self.execute_command('WATCH', *names)
def unwatch(self):
"""