From 251d703c871b3216a18fde161099359f85b3db8a Mon Sep 17 00:00:00 2001 From: liufumingren Date: Sun, 13 Sep 2026 15:32:04 +0800 Subject: [PATCH] =?UTF-8?q?chore(script):=20=E6=9B=B4=E6=96=B0=E6=B3=A2?= =?UTF-8?q?=E6=AC=A1=E9=97=AD=E7=8E=AF=E6=8E=92=E6=9F=A5=E8=84=9A=E6=9C=AC?= =?UTF-8?q?=E6=8A=93=E5=8F=96=E7=9B=AE=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit tmp-trace-wave-closure-cause.cjs 改为在远端源码中定位 batchCancel 相关实现并打印上下文, 不再抓取历史日志片段 --- script/tmp-trace-wave-closure-cause.cjs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/script/tmp-trace-wave-closure-cause.cjs b/script/tmp-trace-wave-closure-cause.cjs index e5faf50..83c9c83 100644 --- a/script/tmp-trace-wave-closure-cause.cjs +++ b/script/tmp-trace-wave-closure-cause.cjs @@ -12,13 +12,12 @@ const WAVE_ID = '1777888535813505'; function buildRemoteScript() { return [ 'set -uo pipefail', - 'D=/root/logs/wms/wms-web.log.2026-09-12', - 'echo "===WRITES_AT_184428_CST==="', - 'grep -a "2026-09-12 18:44:2[0-9]" "$D" 2>/dev/null | grep -a "wms_order_delivery_1000028" | cut -c1-420 | head -20 || true', - 'echo "===WAVE_ID_CLEAR_STMTS_0912==="', - 'grep -a "UPDATE .wms_order_delivery_1000028. SET .wave_id" "$D" 2>/dev/null | cut -c1-19 | uniq -c | head -30 || true', - 'echo "===POST_METHODS_AT_162533==="', - 'grep -a "2026-09-12 16:25:33" "$D" 2>/dev/null | grep -ao "POST /system?method=[a-zA-Z.]*" | sort | uniq -c | head -20 || true', + 'F=/www/wwwroot/qimen/v2/app/service/systemMethods/order/wave.js', + 'echo "===GREP_FUNCS==="', + 'grep -n "async batchCancel\\|batchCancelWave\\|cancelSingleWave\\|wave_status = -1\\|wave_status: -1" "$F" 2>/dev/null | head -20 || true', + 'echo "===SHOW_BATCHCANCEL_REGION==="', + 'S=$(grep -n "async batchCancel(" "$F" | head -1 | cut -d: -f1)', + 'if [ -n "$S" ]; then sed -n "${S},$((S+120))p" "$F"; fi', ].join('\n'); }