MCPcopy
hub / github.com/redis/redis-py / watch

Method watch

redis/client.py:2112–2116  ·  view source on GitHub ↗

Watches the values at keys ``names``

(self, *names)

Source from the content-addressed store, hash-verified

2110 self.execute_command("DISCARD")
2111
2112 def watch(self, *names):
2113 """Watches the values at keys ``names``"""
2114 if self.explicit_transaction:
2115 raise RedisError("Cannot issue a WATCH after a MULTI")
2116 return self.execute_command("WATCH", *names)
2117
2118 def unwatch(self) -> bool:
2119 """Unwatches all previously specified keys"""

Calls 2

execute_commandMethod · 0.95
RedisErrorClass · 0.90