kore

Kore is a web application platform for writing scalable, concurrent web based processes in C or Python.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit 0ac54eb48d9be1be815df2e66cc163be776b15eb
parent 00ef837d6247ecde831f549bcd6ef5d421b091b8
Author: Joris Vink <joris@coders.se>
Date:   Mon,  6 Sep 2021 14:35:04 +0200

Add a kore.config.skipchroot to the Python API.

If set to True, will skip the chroot() of the Kore workers.

This can be handy in case you want to set your deployment target to
production or docker so you get user changes but you don't want
to chroot the processes.

Diffstat:
src/config.c | 18++++++++++++++++++
1 file changed, 18 insertions(+), 0 deletions(-)

diff --git a/src/config.c b/src/config.c @@ -155,6 +155,7 @@ static int configure_task_threads(char *); #if defined(KORE_USE_PYTHON) static int configure_deployment(char *); +static int configure_skip_chroot(char *); static int configure_python_path(char *); static int configure_python_import(char *); #endif @@ -266,6 +267,7 @@ static struct { #endif #if defined(KORE_USE_PYTHON) { "deployment", configure_deployment }, + { "skipchroot", configure_skip_chroot }, #endif #if defined(KORE_USE_PGSQL) { "pgsql_conn_max", configure_pgsql_conn_max }, @@ -1884,6 +1886,22 @@ configure_task_threads(char *option) #if defined(KORE_USE_PYTHON) static int +configure_skip_chroot(char *value) +{ + if (!strcmp(value, "True")) { + skip_chroot = 1; + } else if (!strcmp(value, "False")) { + skip_chroot = 0; + } else { + kore_log(LOG_NOTICE, + "kore.config.skipchroot: bad value '%s'", value); + return (KORE_RESULT_ERROR); + } + + return (KORE_RESULT_OK); +} + +static int configure_deployment(char *value) { if (!strcmp(value, "docker")) {