Skip to content

Commit 7e80aaf

Browse files
committed
Fixes syntax
1 parent 89972c3 commit 7e80aaf

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

doc/platform/app/app_roles.rst

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,13 @@ If multiple custom roles have the ``on_event`` callback defined, these callbacks
7373
defined by roles dependencies.
7474
The ``on_event`` callback provides 3 arguments, when it is called:
7575

76-
- ``config``, which is the configuration of the role;
77-
- ``key``, which reflects the trigger event:
78-
- ``config.apply`` if the callback was triggered by a configuration update;
79-
- ``box.status`` if it was triggered by the ``box.status`` system event.
80-
- ``value``, which shows and logs the information about the instance status as in the trigger ``box.status`` system event.
76+
- ``config``, which is the configuration of the role;
77+
78+
- ``key``, which reflects the trigger event:
79+
80+
- ``config.apply`` if the callback was triggered by a configuration update;
81+
- ``box.status`` if it was triggered by the ``box.status`` system event.
82+
- ``value``, which shows and logs the information about the instance status as in the trigger ``box.status`` system event.
8183
If the callback is triggered by a configuration update, the ``value`` shows the information of the most recent ``box.status`` system event.
8284

8385
.. NOTE::
@@ -110,10 +112,10 @@ As a result, a role module should return an object that has corresponding functi
110112
on_event = function(config, key, value)
111113
local log = require('log')
112114
113-
log.info('roles_cfg.my_role.foo: ' .. config.foo)
114-
log.info('on_event is triggered by ' .. key)
115-
log.info('is_ro: ' .. value.is_ro)
116-
end,
115+
log.info('roles_cfg.my_role.foo: ' .. config.foo)
116+
log.info('on_event is triggered by ' .. key)
117+
log.info('is_ro: ' .. value.is_ro)
118+
end,
117119
}
118120
119121
The examples below show how to do this.

0 commit comments

Comments
 (0)