fix: Worker health check 扫描全部 /proc 进程修复 unhealthy 误判 + 修复 PanelTitleConfig.tsx TS 编译错误
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 4s
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 27s
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 29s
CI/CD Pipeline / PR Build Web Image (pull_request) Successful in 57s
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 1m37s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 2m58s
AI Code Review / AI Code Review (pull_request) Successful in 6m51s
CI/CD Pipeline / Check push changed paths (pull_request) Failing after 13m9s
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Failing after 13m11s
CI/CD Pipeline / Validate - Style (pull_request) Has been cancelled
CI/CD Pipeline / Validate - Security (pull_request) Has been cancelled
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Has been cancelled
CI/CD Pipeline / Unit Tests (pull_request) Has been cancelled
CI/CD Pipeline / Integration Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Unit Tests (pull_request) Has been cancelled
CI/CD Pipeline / Build Production API Image (pull_request) Has been cancelled
CI/CD Pipeline / Build Production Web Image (pull_request) Has been cancelled
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been cancelled
CI/CD Pipeline / Deploy Production (pull_request) Has been cancelled
CI/CD Pipeline / Production Browser E2E (pull_request) Has been cancelled
CI/CD Pipeline / Canary Release to Production (pull_request) Has been cancelled
CI/CD Pipeline / CI Gate (pull_request) Has been cancelled
PR Automation / Auto Merge on CI Green + Approved (pull_request) Successful in 11m0s
CI/CD Pipeline / ACR Image Cleanup (pull_request) Failing after 164h42m37s
CI/CD Pipeline / Staging E2E Tests (pull_request) Failing after 164h42m38s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Failing after 164h42m42s
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Failing after 164h42m43s
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Failing after 164h42m43s
CI/CD Pipeline / Build Staging Web Image (pull_request) Failing after 164h42m44s
CI/CD Pipeline / Build Staging API Image (pull_request) Failing after 164h42m45s
CI/CD Pipeline / Frontend Lint (pull_request) Failing after 164h42m45s
CI/CD Pipeline / Staging API Integration Tests (pull_request) Failing after 165h17m24s
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Failing after 165h17m29s
CI/CD Pipeline / Build Staging Worker Image (pull_request) Failing after 165h17m30s

1. Worker health check 修复:
   - 原 healthcheck 使用 pgrep 和 PID 1 检查,但容器内无 pgrep/ps
   - 部署脚本中 sh -c 嵌套引号导致 $pid 变量提前展开为空
   - 改用 grep -lq celery /proc/[0-9]*/cmdline 扫描所有进程
   - 影响文件:compose.yml, deploy-staging-registry.sh, deploy-production-registry.sh

2. TypeScript 编译错误修复:
   - 移除 PanelTitleConfig.tsx 中未使用的导入和变量
   - 移除:useEffect, TitleLibraryAutoComplete, TitleOption, getTitles, TextArea, Input
   - showTitleLibrary 状态改为 _showTitleLibrary(设置但未读取)
This commit is contained in:
xiaoxia
2026-09-09 18:27:32 +08:00
parent 5f54ac3707
commit ec5cc4c206
4 changed files with 6 additions and 12 deletions
@@ -7,11 +7,8 @@
* - AiAvatarTitleConfig ↔ TitleSettings 的双向适配
* - 自动生成字幕开关
*/
import React, { useMemo, useState, useEffect } from "react"
import { Input } from "antd"
import React, { useMemo, useState } from "react"
import TitleStylePanel from "@/pages/generate/components/title/TitleStylePanel"
import TitleLibraryAutoComplete from "@/pages/generate/components/title/TitleLibraryAutoComplete"
import type { TitleOption } from "@/pages/generate/components/title/TitleLibraryAutoComplete"
import type { TitleSettings } from "@/pages/generate/types"
import {
POSITION_OPTIONS,
@@ -20,9 +17,6 @@ import {
getFontFamily,
} from "@/pages/generate/constants"
import type { AiAvatarTitleConfig } from "../types"
import { getTitles } from "@/api/titles"
const { TextArea } = Input
interface PanelTitleConfigProps {
titleConfig: AiAvatarTitleConfig
@@ -66,7 +60,7 @@ const PanelTitleConfig: React.FC<PanelTitleConfigProps> = ({ titleConfig, onUpda
})
}
const [showTitleLibrary, setShowTitleLibrary] = useState(false)
const [_showTitleLibrary, setShowTitleLibrary] = useState(false)
return (
<div className="aa-title-config">
+2 -2
View File
@@ -128,9 +128,9 @@ services:
- xiaoxia-net
# 健康检查配置
# 注:celery inspect ping 依赖 broker 连接,在容器内不可靠,改用进程检查
# 注:容器内无 pgrep/ps,扫描 /proc 所有进程的 cmdline 查找 celery 进程
healthcheck:
test: ["CMD-SHELL", "for pid in /proc/[0-9]*/cmdline; do if grep -ql celery \"$pid\" 2>/dev/null; then exit 0; fi; done; exit 1"]
test: ["CMD-SHELL", "grep -lq celery /proc/[0-9]*/cmdline 2>/dev/null || exit 1"]
interval: 30s
timeout: 10s
retries: 3
+1 -1
View File
@@ -155,7 +155,7 @@ docker run -d \
--restart unless-stopped \
--cpus 2 \
--memory 2g \
--health-cmd "sh -c \"for pid in /proc/[0-9]*/cmdline; do if grep -ql celery \"$pid\" 2>/dev/null; then exit 0; fi; done; exit 1\"" \
--health-cmd "sh -c \"grep -lq celery /proc/[0-9]*/cmdline 2>/dev/null || exit 1\"" \
--health-interval 30s \
--health-timeout 10s \
--health-retries 3 \
+1 -1
View File
@@ -116,7 +116,7 @@ docker run -d \
-v "$GENERATED_DIR:/app/generated" \
--restart unless-stopped \
--label com.centurylinklabs.watchtower.enable=true \
--health-cmd "sh -c \"for pid in /proc/[0-9]*/cmdline; do if grep -ql celery \"$pid\" 2>/dev/null; then exit 0; fi; done; exit 1\"" \
--health-cmd "sh -c \"grep -lq celery /proc/[0-9]*/cmdline 2>/dev/null || exit 1\"" \
--health-interval 30s \
--health-timeout 10s \
--health-retries 3 \