diff options
Diffstat (limited to 'README.rst')
-rw-r--r-- | README.rst | 18 |
1 files changed, 17 insertions, 1 deletions
@@ -174,7 +174,7 @@ set_response_callback method. This method accepts two arguments: a command name and the callback. Callbacks added in this manner are only valid on the instance the callback is added to. If you want to define or override a callback globally, you should make a subclass of the Redis client and add your callback -to its REDIS_CALLBACKS class dictionary. +to its RESPONSE_CALLBACKS class dictionary. Response callbacks take at least one parameter: the response from the Redis server. Keyword arguments may also be accepted in order to further control @@ -519,6 +519,22 @@ cannot be delivered. When you're finished with a PubSub object, call its >>> ... >>> p.close() + +The PUBSUB set of subcommands CHANNELS, NUMSUB and NUMPAT are also +supported: + +.. code-block:: pycon + + >>> r.pubsub_channels() + ['foo', 'bar'] + >>> r.pubsub_numsub('foo', 'bar') + [('foo', 9001), ('bar', 42)] + >>> r.pubsub_numsub('baz') + [('baz', 0)] + >>> r.pubsub_numpat() + 1204 + + LUA Scripting ^^^^^^^^^^^^^ |