Skip to content
Snippets Groups Projects
Commit f0c5973d authored by Bartek Wrona's avatar Bartek Wrona
Browse files

Improved kill of previous instance of hive sync or hive server.

parent fafb27a3
No related branches found
No related tags found
4 merge requests!456Release candidate v1 24,!230Setup monitoring with pghero,!135Enable postgres monitoring on CI server,!67Ci services kill fixes
...@@ -72,7 +72,7 @@ hivemind_sync: ...@@ -72,7 +72,7 @@ hivemind_sync:
script: script:
- pip3 install --user --upgrade pip setuptools - pip3 install --user --upgrade pip setuptools
- scripts/ci_sync.sh "$HIVEMIND_DB_NAME" "$HIVEMIND_POSTGRESQL_CONNECTION_STRING" "$HIVEMIND_SOURCE_HIVED_URL" $HIVEMIND_MAX_BLOCK - scripts/ci_sync.sh "$HIVEMIND_DB_NAME" "$HIVEMIND_POSTGRESQL_CONNECTION_STRING" "$HIVEMIND_SOURCE_HIVED_URL" $HIVEMIND_MAX_BLOCK $HIVEMIND_HTTP_PORT
artifacts: artifacts:
paths: paths:
......
...@@ -29,6 +29,12 @@ if [ -f hive_server.pid ]; then ...@@ -29,6 +29,12 @@ if [ -f hive_server.pid ]; then
rm hive_server.pid; rm hive_server.pid;
fi fi
fuser $HIVEMIND_HTTP_PORT/tcp -k -INT || true
sleep 5
fuser $HIVEMIND_HTTP_PORT/tcp -k -KILL || true
sleep 5
ls -l dist/* ls -l dist/*
rm -rf ./local-site rm -rf ./local-site
mkdir -p `python3 -m site --user-site` mkdir -p `python3 -m site --user-site`
......
...@@ -6,7 +6,9 @@ set -e ...@@ -6,7 +6,9 @@ set -e
if [ -f $1 ]; then if [ -f $1 ]; then
PID=`cat $1`; PID=`cat $1`;
kill -SIGINT $PID; kill -SIGINT $PID || true;
sleep 5
kill -9 $PID || true;
else else
echo Specified pid file: $1 does not exists.; echo Specified pid file: $1 does not exists.;
fi fi
......
...@@ -7,6 +7,7 @@ HIVEMIND_DB_NAME=$1 ...@@ -7,6 +7,7 @@ HIVEMIND_DB_NAME=$1
HIVEMIND_POSTGRESQL_CONNECTION_STRING=$2 HIVEMIND_POSTGRESQL_CONNECTION_STRING=$2
HIVEMIND_SOURCE_HIVED_URL=$3 HIVEMIND_SOURCE_HIVED_URL=$3
HIVEMIND_MAX_BLOCK=$4 HIVEMIND_MAX_BLOCK=$4
HIVEMIND_HTTP_PORT=$5
PYTHONUSERBASE=./local-site PYTHONUSERBASE=./local-site
...@@ -33,6 +34,12 @@ kill -SIGINT `pgrep -f "$HIVE_NAME server"` || true; ...@@ -33,6 +34,12 @@ kill -SIGINT `pgrep -f "$HIVE_NAME server"` || true;
sleep 5 sleep 5
kill -9 `pgrep -f "$HIVE_NAME server"` || true; kill -9 `pgrep -f "$HIVE_NAME server"` || true;
fuser $HIVEMIND_HTTP_PORT/tcp -k -INT || true
sleep 5
fuser $HIVEMIND_HTTP_PORT/tcp -k -KILL || true
sleep 5
ls -l dist/* ls -l dist/*
rm -rf ./local-site rm -rf ./local-site
mkdir -p `python3 -m site --user-site` mkdir -p `python3 -m site --user-site`
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment