From 71068895aecf0c9c72e6f6abc474e0646ea9f23e Mon Sep 17 00:00:00 2001 From: dashi6174 Date: Mon, 20 May 2024 18:32:24 +0800 Subject: [PATCH] Set the number of task_executor processes through the environment variable WS. (#846) ### What problem does this PR solve? ### Type of change - [x] Other (please describe): Use environment variable to control the task executor processor number. --- docker/entrypoint.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index d5a6e29d5..4caf5a184 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -5,6 +5,9 @@ export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/ PY=python3 +if [[ -z "$WS" || $WS -lt 1 ]]; then + WS=1 +fi function task_exe(){ while [ 1 -eq 1 ];do @@ -12,7 +15,6 @@ function task_exe(){ done } -WS=1 for ((i=0;i