Skip to content

Commit

Permalink
Wait 1 minute for server start
Browse files Browse the repository at this point in the history
  • Loading branch information
demccormack committed Oct 14, 2023
1 parent ebebe04 commit 59f5caf
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,14 @@ jobs:
set -x
cd backend
CORS_ORIGINS='' MEDIA=.. flask --app src/app.py run &
while [[ -z "${DIR_LIST:-}" ]]; do DIR_LIST=$(curl 'http://127.0.0.1:5000/?dir=' || true); done
TRIES=0
while [[ -z "${DIR_LIST:-}" ]] && [[ "$TRIES" -le 120 ]]
do
DIR_LIST=$(curl 'http://127.0.0.1:5000/?dir=' || true)
((++TRIES))
sleep 0.5
done
echo "$DIR_LIST" | grep '{"name":".gitignore","type":"file","url":"/.gitignore"}'
echo "$DIR_LIST" | grep '{"name":"backend","type":"directory","url":"/backend"}'
Expand Down

0 comments on commit 59f5caf

Please sign in to comment.