Skip to content

Commit 2837d8f

Browse files
committed
Gracefully shutdown manager using SIGTERM.
Use SIGTERM instead of SIGKILL to shutdown the manager in `start_manager.sh` to give it a chance to cleanup pg-embed and the pid file. Also add `--dev-mode` switch to the manager command line. This script is only used for local dev, so it's not a security issue. The flag can be removed once the UI has been fully integrated into the manager.
1 parent 0e8207f commit 2837d8f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

scripts/start_manager.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ DEFAULT_BIND_ADDRESS="127.0.0.1"
2626
BIND_ADDRESS="${2:-$DEFAULT_BIND_ADDRESS}"
2727

2828
# Kill manager. pkill doesn't handle process names >15 characters.
29-
pkill -9 dbsp_pipeline_
29+
pkill dbsp_pipeline_
30+
31+
# Wait for manager process to exit.
32+
while ps -p $(pgrep dbsp_pipeline_) > /dev/null; do sleep 1; done
3033

3134
set -e
3235

@@ -38,4 +41,5 @@ cd "${MANAGER_DIR}" && ~/.cargo/bin/cargo run --release --features pg-embed -- \
3841
--dbsp-override-path="${ROOT_DIR}" \
3942
--static-html=static \
4043
--unix-daemon \
44+
--dev-mode \
4145
--db-connection-string="postgres-embed"

0 commit comments

Comments
 (0)