功能修改

This commit is contained in:
npc0-hue
2026-07-20 16:42:33 +08:00
parent 48b8ad8d6c
commit a0e69417db
224 changed files with 22015 additions and 884 deletions
+21
View File
@@ -111,6 +111,25 @@ wait_for_url() {
return 1
}
wait_for_run_registration() {
local attempts="${1:-45}"
local run_pid_file="$LOCAL_DEBUG_PID_DIR/run.pid"
printf 'waiting for run endpoint %s registration\n' "$RUN_ENDPOINT_ID"
for _ in $(seq 1 "$attempts"); do
if [[ -f "$PLATFORM_METADATA_PATH" ]] && grep -Fq "\"ID\": \"$RUN_ENDPOINT_ID\"" "$PLATFORM_METADATA_PATH"; then
printf 'run endpoint %s is registered\n' "$RUN_ENDPOINT_ID"
return 0
fi
if ! managed_pid_running "$run_pid_file"; then
printf 'run exited before endpoint registration; see %s\n' "$LOCAL_DEBUG_LOG_DIR/run.log" >&2
return 1
fi
sleep 1
done
printf 'run endpoint %s did not register before timeout\n' "$RUN_ENDPOINT_ID" >&2
return 1
}
printf 'local debug root: %s\n' "$LOCAL_DEBUG_ROOT"
printf 'platform: %s\n' "$(local_debug_platform_url)"
printf 'platform_web: %s\n' "$(local_debug_web_url)"
@@ -154,6 +173,8 @@ start_service run "$RUN_REPO_DIR" env \
RUN_RETRY_BACKOFF_MS="$RUN_RETRY_BACKOFF_MS" \
go run ./cmd/run
wait_for_run_registration
start_service platform_web "$ROOT_DIR" env \
PLATFORM_API_PROXY="$PLATFORM_API_PROXY" \
VITE_PLATFORM_API_BASE_URL="$VITE_PLATFORM_API_BASE_URL" \