Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: 初始化容器状态检测优化 #492

Merged
merged 1 commit into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion scripts/5_db_backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ function main() {

mysql_images=$(get_mysql_images)

if ! docker ps | grep jms_ >/dev/null; then
if ! docker ps | grep -w "jms_core" &>/dev/null; then
create_db_ops_env
flag=1
fi

if [[ "${DB_HOST}" == "mysql" ]]; then
while [[ "$(docker inspect -f "{{.State.Health.Status}}" jms_mysql)" != "healthy" ]]; do
sleep 5s
Expand Down
3 changes: 2 additions & 1 deletion scripts/6_db_restore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ function main() {

echo "$(gettext 'Start restoring database'): $DB_FILE"

if ! docker ps | grep jms_ >/dev/null; then
if ! docker ps | grep -w "jms_core" &>/dev/null; then
create_db_ops_env
flag=1
fi

if [[ "${DB_HOST}" == "mysql" ]]; then
while [[ "$(docker inspect -f "{{.State.Health.Status}}" jms_mysql)" != "healthy" ]]; do
sleep 5s
Expand Down