From 346133415f502ea7cd12c864cfd409f6d0a0c3af Mon Sep 17 00:00:00 2001 From: claude_dev Date: Wed, 15 Jul 2026 21:35:59 +0800 Subject: [PATCH] =?UTF-8?q?fix(data):=20run=5Fdaily=5Fupdate=20=E6=B3=A8?= =?UTF-8?q?=E5=85=A5=20homebrew=20PATH=20=E4=BF=AE=20launchd=20=E4=B8=8B?= =?UTF-8?q?=20timeout=20not=20found?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit launchd/cron 最小 env 不含 /opt/homebrew/bin,探针 'timeout 30 python3 ...' 报 command not found → 误判新浪源挂 → abort → 每日增量 07-14 起失效、生产数据 停在 07-13。脚本顶部 export homebrew+系统 PATH,兼容 launchd/cron/手动。 根因见 memory cron-python-env-gotchas(timeout 在 homebrew 不在 /usr/bin)。 --- scripts/data_platform/run_daily_update.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/data_platform/run_daily_update.sh b/scripts/data_platform/run_daily_update.sh index db6ebfc..a4c6aba 100755 --- a/scripts/data_platform/run_daily_update.sh +++ b/scripts/data_platform/run_daily_update.sh @@ -22,6 +22,12 @@ # SKIP_VERIFY=1 跳 verify(调试用,默认把关) # SKIP_MERGE=1 跳 merge(调试用) # SKIP_NAS=1 跳推 NAS(烟测用) +# launchd/cron 最小 env 下 timeout(gnu coreutils, 在 homebrew) 不在默认 PATH, +# 探针会因 'timeout: command not found' 误判源挂了而 abort —— 这是 07-14 起 +# 每日增量失效、生产数据停在 07-13 的根因。统一注入 homebrew+系统 PATH,兼容 +# launchd / cron / 手动三种调用。 +export PATH="/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:${PATH}" + set -uo pipefail # 不用 -e:单只失败不退(raw_redownload 内部已容错记 fail) NAS=sanguo-nas