Skip to content

Commit

Permalink
Add sleep before shutdown backup container (#5606)
Browse files Browse the repository at this point in the history
Co-authored-by: Xiaomou <wxm19890422@gmail.com>
  • Loading branch information
ti-chi-bot and wxiaomou committed Apr 4, 2024
1 parent 724031b commit 4fd903f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions images/tidb-backup-manager/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ cleanup() {
if [ ! -d "/tmp/pod" ]; then
mkdir -p /tmp/pod
fi
echo "Sleeping for 10 seconds before exit..."
sleep 10
touch /tmp/pod/main-terminated
}

Expand Down Expand Up @@ -106,6 +108,8 @@ case "$1" in
clean)
shift 1
echo "$BACKUP_BIN clean $@"
echo "Sleeping for 10 seconds before clean..."
sleep 10
$EXEC_COMMAND $BACKUP_BIN clean "$@"
;;
*)
Expand Down

0 comments on commit 4fd903f

Please sign in to comment.