Fix documentation for zmq pub/sub hooks and configuration

Closes #2897177

authorJulien Cristau <julien.cristau@logilab.fr>
changesetc947e3aa1586
branchstable
phasedraft
hiddenyes
parent revision#c0b82dbcf6a3 [entity] improve deprecation messages
child revision#45b33e28045f [zmq] make publish address optional
files modified by this revision
doc/book/en/devrepo/repo/hooks.rst
# HG changeset patch
# User Julien Cristau <julien.cristau@logilab.fr>
# Date 1369304999 -7200
# Thu May 23 12:29:59 2013 +0200
# Branch stable
# Node ID c947e3aa15867658c20c05a94b48b6e47d2bdc7c
# Parent c0b82dbcf6a3ecb7f917c15d7444fa724ce81663
Fix documentation for zmq pub/sub hooks and configuration

Closes #2897177

diff --git a/doc/book/en/devrepo/repo/hooks.rst b/doc/book/en/devrepo/repo/hooks.rst
@@ -180,26 +180,27 @@
1  .. sourcecode:: python
2 
3    class FooHook(hook.Hook):
4        events = ('server_startup',)
5        __regid__ = 'foo_startup'
6 +      order = 1
7 
8        def __call__(self):
9            def callback(msg):
10                self.info('received message: %s', ' '.join(msg))
11 -          self.repo.app_instances_bus.subscribe('hello', callback)
12 +          self.repo.app_instances_bus.add_subscription('hello', callback)
13 
14  .. sourcecode:: python
15 
16    def do_foo(self):
17        actually_do_foo()
18        self._cw.repo.app_instances_bus.publish(['hello', 'world'])
19 
20  The `zmq-address-pub` configuration variable contains the address used
21 -by the instance for sending messages, e.g. `zmqpickle-tcp://*:1234`.  The
22 +by the instance for sending messages, e.g. `tcp://*:1234`.  The
23  `zmq-address-sub` variable contains a comma-separated list of addresses
24 -to listen on, e.g. `zmqpickle-tcp://localhost:1234, zmqpickle-tcp://192.168.1.1:2345`.
25 +to listen on, e.g. `tcp://localhost:1234, tcp://192.168.1.1:2345`.
26 
27 
28  Hooks writing tips
29  ------------------
30