Skip to content

Commit

Permalink
Simpler times call for simpler docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
ralphbean committed Feb 25, 2016
1 parent a59a0d8 commit 0c773b1
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions doc/consuming.rst
Expand Up @@ -25,18 +25,12 @@ The most straightforward way, programmatically, to consume messages is to use
form ``(name, endpoint, topic, message)``::

>>> import fedmsg
>>> import fedmsg.config

>>> # Read in the config from /etc/fedmsg.d/
>>> config = fedmsg.config.load_config([], None)
>>> config = fedmsg.config.load_config()

>>> # Disable a warning about not sending. We know. We only want to tail.
>>> config['mute'] = True

>>> # Disable timing out so that we can tail forever. This is deprecated
>>> # and will disappear in future versions.
>>> config['timeout'] = 0

>>> for name, endpoint, topic, msg in fedmsg.tail_messages(**config):
>>> for name, endpoint, topic, msg in fedmsg.tail_messages(mute=True, **config):
... print topic, msg # or use fedmsg.encoding.pretty_dumps(msg)

The API is easy to use and should hopefully make your scripts easy to understand
Expand Down

0 comments on commit 0c773b1

Please sign in to comment.