Module: kamailio
Branch: master
Commit: 8c59f8e782381811b1afb6a75b8b8c9fa6959933
URL:
https://github.com/kamailio/kamailio/commit/8c59f8e782381811b1afb6a75b8b8c9…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2022-11-15T17:31:21+01:00
modules: readme files regenerated - app_python3 ... [skip ci]
---
Modified: src/modules/app_python3/README
---
Diff:
https://github.com/kamailio/kamailio/commit/8c59f8e782381811b1afb6a75b8b8c9…
Patch:
https://github.com/kamailio/kamailio/commit/8c59f8e782381811b1afb6a75b8b8c9…
---
diff --git a/src/modules/app_python3/README b/src/modules/app_python3/README
index f59291a078..914350572b 100644
--- a/src/modules/app_python3/README
+++ b/src/modules/app_python3/README
@@ -195,9 +195,9 @@ python_exec("my_python_function", "$rU");
in each worker when it next invokes a Python method. The module uses a
worker process lock to prevent recursive reloads.
- This function only reloads the user script and creates a new script
- object. It does not reinitialize the interpreter. E.g., references in
- the old module remain if not redefined by the new version.
+ This function only reloads (re-executes) the user script and creates a
+ new script object. It does not reinitialize the interpreter (references
+ in the old module remain if not redefined by the new version).
Name: app_python.reload
@@ -208,6 +208,24 @@ python_exec("my_python_function", "$rU");
kamcmd app_python.reload
...
+ Note that reload is done for the Python script provided as parameter to
+ this Kamailio module. To reload the Python libraries imported in this
+ script, use something like:
+...
+import mod1
+...
+import modN
+from importlib import reload
+
+def mod_init():
+ reload(mod1)
+ ...
+ reload(modN)
+ return kamailio()
+...
+
+ Where "modX" are the modules imported at the top.
+
5.2. app_python.api_list
List the functions available via Kemi framework.