Skip to content

Commit

Permalink
chore: cleanup flask init in command script
Browse files Browse the repository at this point in the history
  • Loading branch information
gregmundy committed Jul 1, 2019
1 parent 5488ec0 commit fd5f114
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions cmd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ WORKERS=4
# The Pipfile specifes "editable = true" (otherwise, Pip does not install non-Python files).
MIGRATION_PATH="/master-client-index/src/mci-database/mci_database/db/migrations"

# RETRIES=0
# until flask db upgrade -d $MIGRATION_PATH; do
# RETRIES=`expr $RETRIES + 1`
# if [[ "$RETRIES" -eq "$MAX_RETRIES" ]]; then
# echo "Retry Limit Exceeded. Aborting..."
# exit 1
# fi
# sleep 2
# done
RETRIES=0
until flask db upgrade -d $MIGRATION_PATH; do
RETRIES=`expr $RETRIES + 1`
if [[ "$RETRIES" -eq "$MAX_RETRIES" ]]; then
echo "Retry Limit Exceeded. Aborting..."
exit 1
fi
sleep 2
done

if [ "$APP_ENV" == "DEVELOPMENT" ] || [ -z "$APP_ENV" ]; then
gunicorn -b 0.0.0.0 wsgi --reload --log-level=DEBUG --timeout 240 --worker-class gevent
Expand Down

0 comments on commit fd5f114

Please sign in to comment.