Skip to content

Commit

Permalink
optimize wait mongo ready prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
bxy4543 committed Oct 11, 2023
1 parent 85414c8 commit af4850b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion deploy/cloud/scripts/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,16 @@ function gen_mongodbUri() {
echo "waiting for mongodb secret generated"
# if there is no sealos-mongodb-conn-credential secret then wait for mongodb ready
while [ -z "$(kubectl get secret -n sealos sealos-mongodb-conn-credential 2>/dev/null)" ]; do
sleep 3
echo -ne "Waiting for MongoDB ready \r"
sleep 0.5
echo -ne "Waiting for MongoDB ready . \r"
sleep 0.5
echo -ne "Waiting for MongoDB ready .. \r"
sleep 0.5
echo -ne "Waiting for MongoDB ready ... \r"
sleep 0.5
done
echo "mongodb secret has been generated successfully."
chmod +x scripts/gen-mongodb-uri.sh
mongodbUri=$(scripts/gen-mongodb-uri.sh)
fi
Expand Down

0 comments on commit af4850b

Please sign in to comment.