Update doc/topics/event/index.rst

default sock_dir was changed. Updated this doc to work with new location.
This commit is contained in:
David Boucha 2013-01-04 18:40:27 -07:00
parent 8b1cd6e6f8
commit a93f30d5cb

View File

@ -18,7 +18,7 @@ by the same system user that Salt is running as. To listen to events a
SaltEvent object needs to be created and then the get_event function needs to
be run. The SaltEvent object needs to know the location that the Salt unix
sockets are kept. In the configuration this is the ``sock_dir`` option. The
``sock_dir`` option defaults to "/var/run/salt" on most systems.
``sock_dir`` option defaults to "/var/run/salt/master" on most systems.
The following code will check for a single event:
@ -26,7 +26,7 @@ The following code will check for a single event:
import salt.utils.event
event = salt.utils.event.MasterEvent('/var/run/salt')
event = salt.utils.event.MasterEvent('/var/run/salt/master')
data = event.get_event()
@ -41,7 +41,7 @@ instead of the default 5.
import salt.utils.event
event = salt.utils.event.MasterEvent('/var/run/salt')
event = salt.utils.event.MasterEvent('/var/run/salt/master')
data = event.get_event(wait=10, tag='auth')
@ -53,7 +53,7 @@ method also accepts a tag, but not a wait time:
import salt.utils.event
event = salt.utils.event.MasterEvent('/var/run/salt')
event = salt.utils.event.MasterEvent('/var/run/salt/master')
for data in event.iter_events(tag='auth'):
print(data)