You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/platform/app/app_roles.rst
+10-8Lines changed: 10 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -74,19 +74,21 @@ defined by roles dependencies.
74
74
75
75
The ``on_event`` callback provides 3 arguments, when it is called:
76
76
77
-
- ``config``, which contains the configuration of the role;
77
+
- ``config``, which contains the configuration of the role;
78
78
79
-
- ``key``, which reflects the trigger event:
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
-
83
-
- ``value``, which shows and logs the information about the instance status as in the trigger ``box.status`` system event. If the callback is triggered by a configuration update, the ``value`` shows the information of the most recent ``box.status`` system event.
79
+
- ``key``, which reflects the trigger event:
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.
83
+
If the callback is triggered by a configuration update, the ``value`` shows the information of the most recent ``box.status`` system event.
84
84
85
85
.. NOTE::
86
86
87
-
- All ``on_event`` callbacks with the ``config.apply`` key are executed as a part of the configuration process. Process statuses ``ready`` or ``check_warnings`` are reached only after all such ``on_event`` callbacks are done.
87
+
- All ``on_event`` callbacks with the ``config.apply`` key are executed as a part of the configuration process.
88
+
Process statuses ``ready`` or ``check_warnings`` are reached only after all such ``on_event`` callbacks are done.
88
89
89
-
- All ``on_event`` callbacks are executed inside of a ``pcall``. If an error is raised for a callback, it is logged with the ``error`` level and the series execution continues.
90
+
- All ``on_event`` callbacks are executed inside of a ``pcall``. If an error is raised for a callback, it is logged
91
+
with the ``error`` level and the series execution continues.
90
92
91
93
Creating a custom role includes the following steps:
0 commit comments