Skip to content

Commit

Permalink
Merge pull request #174 from liuhuiCNN/patch-1
Browse files Browse the repository at this point in the history
Update streams.rst
  • Loading branch information
coleifer committed Jun 9, 2022
2 parents 4b5534f + 031316d commit 6336cb2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/streams.rst
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ approximate by default.
.. code-block:: python
# Adding and deleting a message:
msgid4 = stream.xadd({'message': 'delete me'})
msgid4 = stream.add({'message': 'delete me'})
del stream[msgid4]
# How many items are in the stream?
Expand Down Expand Up @@ -200,7 +200,7 @@ RDB and replicated.
# created, so we have to add an empty message.
stream_keys = ['stream-a', 'stream-b', 'stream-c']
for stream in stream_keys:
db.xadd(stream, {'data': ''})
db.add(stream, {'data': ''})
# Create a consumer-group for streams a, b, and c. We will mark all
# messages as having been processed, so only messages added after the
Expand Down

0 comments on commit 6336cb2

Please sign in to comment.