diff --git a/apps/web/src/pages/ai-avatar/components/PanelTitleConfig.tsx b/apps/web/src/pages/ai-avatar/components/PanelTitleConfig.tsx index 5411d7efa..6ddc0b77c 100644 --- a/apps/web/src/pages/ai-avatar/components/PanelTitleConfig.tsx +++ b/apps/web/src/pages/ai-avatar/components/PanelTitleConfig.tsx @@ -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 = ({ titleConfig, onUpda }) } - const [showTitleLibrary, setShowTitleLibrary] = useState(false) + const [_showTitleLibrary, setShowTitleLibrary] = useState(false) return (
diff --git a/infra/docker/compose.yml b/infra/docker/compose.yml index b0ce86443..46bfc0e74 100755 --- a/infra/docker/compose.yml +++ b/infra/docker/compose.yml @@ -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 diff --git a/infra/docker/deploy-production-registry.sh b/infra/docker/deploy-production-registry.sh index e9a4a6a27..c0a78f05f 100755 --- a/infra/docker/deploy-production-registry.sh +++ b/infra/docker/deploy-production-registry.sh @@ -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 \ diff --git a/infra/docker/deploy-staging-registry.sh b/infra/docker/deploy-staging-registry.sh index e7494c9b3..c5441d9f9 100755 --- a/infra/docker/deploy-staging-registry.sh +++ b/infra/docker/deploy-staging-registry.sh @@ -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 \