no message
This commit is contained in:
@@ -51,7 +51,7 @@ jobs:
|
||||
|
||||
- name: Verify pid is alive
|
||||
run: |
|
||||
sleep 2
|
||||
sleep 5
|
||||
PID_FILE="$DEPLOY_DIR/.pid"
|
||||
if [ ! -f "$PID_FILE" ]; then
|
||||
echo "no .pid file at $PID_FILE" >&2
|
||||
@@ -60,12 +60,17 @@ jobs:
|
||||
fi
|
||||
PID=$(cat "$PID_FILE")
|
||||
echo "pid=$PID"
|
||||
if ! kill -0 "$PID" 2>/dev/null; then
|
||||
echo "pid $PID not alive" >&2
|
||||
for i in 1 2 3; do
|
||||
if kill -0 "$PID" 2>/dev/null; then
|
||||
echo "service running, pid=$PID (attempt $i)"
|
||||
exit 0
|
||||
fi
|
||||
echo "attempt $i: pid $PID not alive yet, retrying..."
|
||||
sleep 2
|
||||
done
|
||||
echo "pid $PID not alive after 3 attempts" >&2
|
||||
sudo -n tail -n 50 "$DEPLOY_DIR/logs/app.log" >&2 || true
|
||||
exit 1
|
||||
fi
|
||||
echo "service running, pid=$PID"
|
||||
|
||||
- name: HTTP health check
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user