Mercurial > libervia-backend
comparison doc/libervia-cli/pubsub_hook.rst @ 3563:267e4987b58b
doc: fix remaining SàT references/typos + add `libervia-cli` missing commands
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 11 Jun 2021 09:21:41 +0200 |
parents | c80a0f864b5d |
children | 21e7d46b988c |
comparison
equal
deleted
inserted
replaced
3562:9f599ccbea4e | 3563:267e4987b58b |
---|---|
17 A path to a Python script is expected as argument. The script must contain a ``hook`` | 17 A path to a Python script is expected as argument. The script must contain a ``hook`` |
18 function. | 18 function. |
19 | 19 |
20 ``python_code`` | 20 ``python_code`` |
21 Python code which will be directly executed. 3 variables will be set: ``host`` which | 21 Python code which will be directly executed. 3 variables will be set: ``host`` which |
22 contain the main SàT instance, ``client`` which contain the session attached to the | 22 contain the main Libervia instance, ``client`` which contain the session attached to the |
23 profile, and ``item`` which contain the item attached to the event. | 23 profile, and ``item`` which contain the item attached to the event. |
24 | 24 |
25 .. note:: | 25 .. note:: |
26 | 26 |
27 Hooks are executed in SàT context, and must be asynchronous. If they block, the whole | 27 Hooks are executed in Libervia context, and must be asynchronous. If they block, the whole |
28 SàT execution will be blocked. They have access to everything, so don't run a code that | 28 Libervia execution will be blocked. They have access to everything, so don't run a code that |
29 you don't absolutely trust. | 29 you don't absolutely trust. |
30 | 30 |
31 .. note:: | 31 .. note:: |
32 | 32 |
33 Only ``python_file`` type is currently implemented | 33 Only ``python_file`` type is currently implemented |