From 09dc36d59119b3e240c9249ee552c53b74f11a42 Mon Sep 17 00:00:00 2001 From: qing <1776177662@qq.com> Date: Mon, 10 Aug 2026 16:05:26 +0000 Subject: [PATCH] =?UTF-8?q?refactor:=20=E7=A7=BB=E9=99=A4=E5=85=A8?= =?UTF-8?q?=E9=83=A8=E5=90=AF=E5=8A=A8=E8=84=9A=E6=9C=AC=E4=B8=AD=E7=9A=84?= =?UTF-8?q?=20sleep=20=E5=BB=B6=E6=97=B6=E4=B8=8E=20services.yaml=20?= =?UTF-8?q?=E4=B8=AD=E7=9A=84=20sleep=5Fbefore?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ca/_run.sh | 1 - captcha/_run.sh | 1 - confs2/_run.sh | 1 - core/services.yaml | 8 ++++---- db/_run.sh | 1 - gateway/_run.sh | 1 - static/_run.sh | 1 - 7 files changed, 4 insertions(+), 10 deletions(-) diff --git a/ca/_run.sh b/ca/_run.sh index 255f6d6..4147d50 100755 --- a/ca/_run.sh +++ b/ca/_run.sh @@ -5,5 +5,4 @@ # "$@" 透传允许命令行临时覆盖任意配置项。 cd "$(dirname "$0")" || exit -# sleep 已移至 services.yaml 的 sleep_before 字段统一管理 exec ./build/ca.out "$@" diff --git a/captcha/_run.sh b/captcha/_run.sh index 44f8e97..2cac9a1 100755 --- a/captcha/_run.sh +++ b/captcha/_run.sh @@ -1,5 +1,4 @@ #!/bin/bash cd "$(dirname "$0")" || exit source venv/bin/activate -sleep 1 exec python3 captcha_service.py diff --git a/confs2/_run.sh b/confs2/_run.sh index 62110a6..bbb5017 100755 --- a/confs2/_run.sh +++ b/confs2/_run.sh @@ -1,4 +1,3 @@ #!/bin/bash cd "$(dirname "$0")" || exit -sleep 1 exec ./confs2.bin diff --git a/core/services.yaml b/core/services.yaml index f449c9f..ab949d0 100644 --- a/core/services.yaml +++ b/core/services.yaml @@ -41,7 +41,7 @@ services: cmd: bash /opt/micro_servers/ai_review/_run.sh args: ["--instance", "ai_review", "--log-level", "info"] depends_on: [db2] - sleep_before: 2 + sleep_before: 0 # --- 文件服务 --- - name: dnfs2 @@ -78,7 +78,7 @@ services: cmd: bash /opt/micro_servers/smtp/_run.sh args: ["--instance", "smtp", "--log-level", "info"] depends_on: [] - sleep_before: 2 + sleep_before: 0 # --- 前端静态资源 --- - name: fsys @@ -161,13 +161,13 @@ services: - "--smtp-port" - "8008" depends_on: [db2] - sleep_before: 2 + sleep_before: 0 - name: gateway cmd: bash /opt/micro_servers/gateway/_run.sh args: ["--instance", "gateway", "--log-level", "info"] depends_on: [db2] - sleep_before: 2 + sleep_before: 0 # --- 验证码 --- - name: captcha2 diff --git a/db/_run.sh b/db/_run.sh index 9b85f84..66975c6 100644 --- a/db/_run.sh +++ b/db/_run.sh @@ -2,5 +2,4 @@ cd "$(dirname "$0")" || exit source ./venv/bin/activate #exec ./main.dist/main.bin -sleep 1 exec python3 dbv2.py diff --git a/gateway/_run.sh b/gateway/_run.sh index b9b5ba8..1517e75 100644 --- a/gateway/_run.sh +++ b/gateway/_run.sh @@ -4,5 +4,4 @@ # 启动时从 confs(CONFS_HOST:CONFS_PORT,默认 127.0.0.1:8010)拉取配置。 cd "$(dirname "$0")" || exit -# sleep 已移至 services.yaml 的 sleep_before 字段统一管理 exec ./build/gateway.out "$@" diff --git a/static/_run.sh b/static/_run.sh index ad6bd5c..dc49454 100644 --- a/static/_run.sh +++ b/static/_run.sh @@ -2,5 +2,4 @@ cd "$(dirname "$0")" || exit source ./venv/bin/activate #exec ./fsys.bin 1>/dev/null -sleep 2 exec python3 ./fsys.py 1>/dev/null