Fix bare worktree submodule clone and host AI startup wait on deploy.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -161,6 +161,9 @@ sync_source_from_git() {
|
||||
fail "브랜치 없음: ${branch} (GIT_DIR=${GIT_DIR})"
|
||||
fi
|
||||
git --work-tree="${tree}" --git-dir="${GIT_DIR}" checkout -f "${branch}"
|
||||
if [[ ! -e "${tree}/.git" ]]; then
|
||||
echo "gitdir: ${GIT_DIR}" > "${tree}/.git"
|
||||
fi
|
||||
sync_github_submodules "${tree}" || true
|
||||
local commit
|
||||
commit="$(git --git-dir="${GIT_DIR}" rev-parse --short HEAD)"
|
||||
@@ -252,6 +255,16 @@ ensure_host_ai() {
|
||||
if host_ai_ready; then
|
||||
return 0
|
||||
fi
|
||||
log "호스트 AI 기동 대기 (최대 120s)..."
|
||||
local i=0
|
||||
while (( i < 120 )); do
|
||||
if host_ai_ready; then
|
||||
log "✅ 호스트 AI 준비 완료"
|
||||
return 0
|
||||
fi
|
||||
sleep 5
|
||||
i=$((i + 5))
|
||||
done
|
||||
if curl -sf --max-time 3 "http://127.0.0.1:${LLM_PORT}/v1/models" >/dev/null 2>&1; then
|
||||
log "⚠️ LLM만 응답 (Embed/Rerank 미기동) — degraded 모드로 계속"
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user