Skip to content

Commit 6f42cd7

Browse files
mishraompCopilot
andauthored
switch native aws wait than poll
Co-authored-by: Copilot <[email protected]>
1 parent ce881eb commit 6f42cd7

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

.github/scripts/resume.sh

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,7 @@ start_db_cluster() {
4949
aws rds start-db-cluster --db-cluster-identifier ${cluster_id} --no-cli-pager --output json
5050

5151
echo "Waiting for DB cluster to be available..."
52-
local attempt=1
53-
until [[ $(aws rds describe-db-clusters --db-cluster-identifier ${cluster_id} --query 'DBClusters[0].Status' --output text) == "available" ]] || [[ $attempt -gt $max_attempts ]]
54-
do
55-
echo "Waiting for DB cluster... Attempt $attempt of $max_attempts"
56-
sleep 60
57-
((attempt++))
58-
done
59-
60-
if [[ $attempt -gt $max_attempts ]]; then
52+
if ! aws rds wait db-cluster-available --db-cluster-identifier ${cluster_id}; then
6153
echo "Timeout waiting for DB cluster to become available"
6254
return 1
6355
fi

0 commit comments

Comments
 (0)