Skip to content
This repository has been archived by the owner on May 6, 2021. It is now read-only.

Commit

Permalink
Fix counter while waiting for database
Browse files Browse the repository at this point in the history
cnt+=1 was just strcating 1

increase counter to 50 along the way
  • Loading branch information
chmouel committed Dec 5, 2018
1 parent 83e9c78 commit 5a55183
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions openshift/deploy-openshift-dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ function deploy_db() {
for x in ${DBS};do
cnt=0
while true;do
[[ ${cnt} -ge 20 ]] && { echo "Cannot connect to database"; exit 1 ; }
[[ ${cnt} -ge 50 ]] && { echo "Cannot connect to database"; exit 1 ; }
oc rsh dc/${DC_DB} psql -c "create database ${x};" && break || {
cnt+=1
(( cnt++ ))
sleep 5
}
done
Expand Down

0 comments on commit 5a55183

Please sign in to comment.