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'); }