Skip to content

Commit

Permalink
Fix ack.sh script to ensure proper return value when lock file is mis…
Browse files Browse the repository at this point in the history
…sing in auto-scaling function. Added a return 1 statement to prevent false positives in scaling checks, enhancing the reliability of the script's operation.
  • Loading branch information
xiagw committed Dec 28, 2024
1 parent 696cd7e commit a6a4d01
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/aliyun/ack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,8 @@ ack_auto_scale() {
return 0
fi
fi
# 如果锁文件不存在,返回 1(false)【实际测试了bash必须存在这个return 1,否则就算文件不存在也会返回0】
return 1
}

# 检查扩容冷却期
Expand Down

0 comments on commit a6a4d01

Please sign in to comment.