Skip to content

Commit

Permalink
feat: Increase wait time for conditional output in utilityFunction.sh
Browse files Browse the repository at this point in the history
The wait time for conditional output in the `utilityFunction.sh` file has been increased from 5 seconds to 10 seconds. This change ensures that the condition is given enough time to be met before proceeding.
  • Loading branch information
hiroTochigi committed Sep 21, 2024
1 parent 7e171d2 commit 998732a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/aws/dependencies/utilitiyFunction.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function waitForConditionalOutput() {
fi
fi
attempt=$((attempt + 1))
sleep 5
sleep 10
done

echo "Error: Failed to meet the condition after $maxAttempts attempts."
Expand Down
6 changes: 5 additions & 1 deletion src/aws/up.sh
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,11 @@ function up {
if [ -z "$instanceId" ]; then
createAndTagInstance
else
instanceState=$(checkInstanceState $instanceId)
instanceState=$(waitForConditionalOutput "checkInstanceState $instanceId" "\"stopping\"" "different")
if [ $? -ne 0 ]; then
echo "Wait for starting on start command until instance is stopped."
exit 1
fi

case "$instanceState" in
"running")
Expand Down

0 comments on commit 998732a

Please sign in to comment.