Skip to content

Commit 535057c

Browse files
committed
kill by pid to avoid killing similar processes
1 parent b2144d3 commit 535057c

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

template/start-code-interpreter.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ until curl -s -o /dev/null -w '%{http_code}' http://localhost:8888/api/status |
66
done
77
echo "Jupyter server is ready, starting Code Interpreter..."
88

9+
echo $$ > /var/run/code-interpreter.pid
910
exec /root/.server/.venv/bin/uvicorn main:app --host 0.0.0.0 --port 49999 --workers 1 --no-access-log --no-use-colors --timeout-keep-alive 640

template/start-jupyter.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44

55
# Jupyter exited — kill code-interpreter so supervisord restarts both
66
echo "Jupyter exited, killing code-interpreter..."
7-
pkill -f "uvicorn main:app"
7+
kill "$(cat /var/run/code-interpreter.pid)" 2>/dev/null

0 commit comments

Comments
 (0)