Skip to content

Commit

Permalink
add a limit to the download loop
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgatis committed Aug 26, 2024
1 parent 02695f5 commit 95b8114
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/test_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ jobs:
run: pip install .[cli,dev]
- name: Test installation with pytest
run: |
rembg d
while [ $? -ne 0 ]; do !!; done
attempt=0
until rembg d || [ $attempt -eq 5 ]; do
attempt=$((attempt+1))
echo "Attempt $attempt to download the models..."
done
if [ $attempt -eq 5 ]; then
echo "downloading the models failed 5 times, exiting..."
exit 1
fi
pytest

0 comments on commit 95b8114

Please sign in to comment.