diff --git a/doc/ref/states/ordering.rst b/doc/ref/states/ordering.rst index 4010f633fc..40da2a8c85 100644 --- a/doc/ref/states/ordering.rst +++ b/doc/ref/states/ordering.rst @@ -140,19 +140,19 @@ installed. This is normal require behavior, but if the watched file changes, or the watched package is installed or upgraded, then the redis service is restarted. -Watch and the Watcher Function ------------------------------- +Watch and the mod_watch Function +-------------------------------- -The watch requisite is based on the ``watcher`` function. Python state -modules can include a function called ``watcher`` which is then called +The watch requisite is based on the ``mod_watch`` function. Python state +modules can include a function called ``mod_watch`` which is then called if the watch call is invoked. In the case of the service module the underlying service is restarted. In the case of the cmd state the command is executed. -The watcher function for the service state looks like this: +The ``mod_watch`` function for the service state looks like this: .. code-block:: python - def watcher(name, sig=None): + def mod_watch(name, sig=None): ''' The service watcher, called to invoke the watch command. @@ -174,10 +174,10 @@ The watcher function for the service state looks like this: 'result': True, 'comment': 'Service {0} started'.format(name)} -The watch requisite only works if the state that is watching has a watcher -function written. If watch is set on a state that does not have a watcher -function (like pkg), then the listed states will behave only as if they were -under a ``require`` statement. +The watch requisite only works if the state that is watching has a +``mod_watch`` function written. If watch is set on a state that does not have +a ``mod_watch`` function (like pkg), then the listed states will behave only +as if they were under a ``require`` statement. The Order Option ================