You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
517B

  1. #!/bin/bash
  2. SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
  3. source $SCRIPT_DIR/gcp_version.sh
  4. #wait GAE pending operations
  5. for ((i=1; i<120; i++)); do
  6. echo "check pending GAE operations ... "
  7. op=`gcloud app operations list --filter=status=PENDING --format=json`
  8. if [ "$op" == "[]" ]; then
  9. echo "no pending";
  10. del_old_instances
  11. break;
  12. else
  13. echo "$op"
  14. echo "check $i of 120 (normally it takes 70 checks = 3-5 minutes"
  15. sleep 3;
  16. fi
  17. done
  18. echo "finished";