release: bump version to 0.31.0

This commit is contained in:
linkong
2026-04-21 18:35:40 +08:00
parent 0f89372d71
commit b7647379de
21 changed files with 1833 additions and 293 deletions

View File

@@ -1054,6 +1054,14 @@ start_ai_provider_service() {
exit 1
}
ai_provider_service_healthy() {
local ai_provider_port="${1:-$DEFAULT_AI_PROVIDER_PORT}"
docker inspect "$AI_PROVIDER_CONTAINER_NAME" >/dev/null 2>&1 || return 1
curl -s --max-time "$HTTP_CHECK_MAX_TIME" \
"http://localhost:${ai_provider_port}/health" >/dev/null 2>&1
}
ensure_database_services_healthy() {
local retry=1
@@ -1130,7 +1138,15 @@ start_backend_service() {
log_success "启动数据库已就绪"
sleep 3
start_ai_provider_service "$ai_provider_port"
# Backend depends on AI Provider reachability, but a backend-only restart
# should reuse the existing healthy provider instead of rebuilding or
# restarting it.
if ai_provider_service_healthy "$ai_provider_port"; then
log_note "AI Provider 已健康,复用现有服务,跳过启动/重建"
else
log_note "AI Provider 当前不健康,先执行托底启动"
start_ai_provider_service "$ai_provider_port"
fi
if [ "$backend_port_requested" -eq 1 ]; then
kill_port_if_requested "$backend_port" "后端"