summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy McCurdy <andy@andymccurdy.com>2019-05-28 14:14:40 -0700
committerAndy McCurdy <andy@andymccurdy.com>2019-05-28 14:14:40 -0700
commitb9f49c38f11965727d32f41e4a5b802f72fb60f6 (patch)
treeb6d2ac1d82225a1673d17ea1366cf07bc159836a
parent4986b5541e804257bee108908c2184d8ec6dd79c (diff)
downloadredis-py-b9f49c38f11965727d32f41e4a5b802f72fb60f6.tar.gz
cleanup MONITOR docs
-rw-r--r--CHANGES2
-rw-r--r--README.rst14
2 files changed, 9 insertions, 7 deletions
diff --git a/CHANGES b/CHANGES
index a3d98f5..a6bc061 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,8 @@
* Resolve a race condition with the PubSubWorkerThread. #1150
* Cleanup socket read error messages. Thanks Vic Yu. #1159
* Cleanup the Connection's selector correctly. Thanks Bruce Merry. #1153
+ * Added a Monitor object to make working with MONITOR output easy.
+ Thanks Roey Prat #1033
* 3.2.1
* Fix SentinelConnectionPool to work in multiprocess/forked environments.
* 3.2.0
diff --git a/README.rst b/README.rst
index 01551fa..8ea31b8 100644
--- a/README.rst
+++ b/README.rst
@@ -677,16 +677,16 @@ supported:
Monitor
^^^^^^^
-redis-py includes a `Monitor` object that that streams back every command
-processed by the Redis server. Use `listen` on the `Monitor` object to block
-until message available.
+redis-py includes a `Monitor` object that streams every command processed
+by the Redis server. Use `listen()` on the `Monitor` object to block
+until a command is received.
.. code-block:: pycon
- >>> r = redis.StrictRedis(...)
- >>> with sr.monitor() as m:
- >>> for command in m.listen():
- >>> print(command)
+ >>> r = redis.Redis(...)
+ >>> with r.monitor() as m:
+ >>> for command in m.listen():
+ >>> print(command)
Lua Scripting
^^^^^^^^^^^^^