mirror of
https://git.mirrors.martin98.com/https://github.com/danielgatis/rembg
synced 2025-08-20 05:39:07 +08:00
add a limit to the download loop
This commit is contained in:
parent
02695f5bf2
commit
95b81143c9
11
.github/workflows/test_install.yml
vendored
11
.github/workflows/test_install.yml
vendored
@ -19,6 +19,13 @@ jobs:
|
|||||||
run: pip install .[cli,dev]
|
run: pip install .[cli,dev]
|
||||||
- name: Test installation with pytest
|
- name: Test installation with pytest
|
||||||
run: |
|
run: |
|
||||||
rembg d
|
attempt=0
|
||||||
while [ $? -ne 0 ]; do !!; done
|
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
|
pytest
|
||||||
|
Loading…
x
Reference in New Issue
Block a user