Skip to content

Commit

Permalink
fix: Avoid starting worker if model download RC != 0
Browse files Browse the repository at this point in the history
  • Loading branch information
db0 authored and tazlin committed Jan 23, 2024
1 parent 43bf507 commit 7b50dba
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
5 changes: 5 additions & 0 deletions horde-bridge.cmd
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
@echo off
cd /d %~dp0
call runtime python -s download_models.py
if ERRORLEVEL 1 GOTO ABORT
echo "Model Download OK. Starting worker..."
call runtime python -s run_worker.py %*

:ABORT
echo "download_models.py exited with error code. Aborting"
8 changes: 6 additions & 2 deletions horde-bridge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,9 @@ if [ -z "$LD_PRELOAD" ]; then
fi


./runtime.sh python -s download_models.py
./runtime.sh python -s run_worker.py $*
if ./runtime.sh python -s download_models.py; then
echo "Model Download OK. Starting worker..."
./runtime.sh python -s run_worker.py $*
else
echo "download_models.py exited with error code. Aborting"
fi

0 comments on commit 7b50dba

Please sign in to comment.