start-comfyui: wait out mid-shutdown process before already-running check

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Hanashi
2026-08-06 03:23:09 -04:00
parent 64e488fa49
commit 58b4755475
+5
View File
@@ -6,6 +6,11 @@ set -euo pipefail
LOG=/workspace/minimax-h3/comfyui.log
# wait out any process that is mid-shutdown before deciding it's "running"
for i in 1 2 3 4 5; do
pgrep -f "python3? main.py" >/dev/null || break
sleep 2
done
if pgrep -f "python3? main.py" >/dev/null; then
echo "ComfyUI already running"
exit 0