mirror of
https://github.com/storytold/cloud-worker.git
synced 2026-10-17 00:23:49 +00:00
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:
@@ -6,6 +6,11 @@ set -euo pipefail
|
|||||||
|
|
||||||
LOG=/workspace/minimax-h3/comfyui.log
|
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
|
if pgrep -f "python3? main.py" >/dev/null; then
|
||||||
echo "ComfyUI already running"
|
echo "ComfyUI already running"
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
Reference in New Issue
Block a user