@@ -68,7 +68,7 @@ A custom application role is an object which implements custom functions or logi
68
68
For example, a logging role can be created to add logging functionality on top of the built-in one.
69
69
70
70
Since version :doc: `3.4.0 </release/3.4.0 >`, you can define an ``on_event `` callback for custom roles. The ``on_event `` callback is called
71
- every time a ``box.status `` system event is broadcasted, or after the `` apply `` action of the configuration update is finished .
71
+ every time a ``box.status `` system event is broadcasted.
72
72
If multiple custom roles have the ``on_event `` callback defined, these callbacks are called one after another in the order
73
73
defined by roles dependencies.
74
74
@@ -111,11 +111,10 @@ As a result, a role module should return an object that has corresponding functi
111
111
stop = function() -- ... -- end,
112
112
dependencies = { -- ... -- },
113
113
on_event = function(config, key, value)
114
- local log = require('log')
115
-
116
- log.info('roles_cfg.my_role.foo: ' .. config.foo)
117
- log.info('on_event is triggered by ' .. key)
118
- log.info('is_ro: ' .. value.is_ro)
114
+ local log = require('log')
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)
119
118
end,
120
119
}
121
120
0 commit comments