WMS_MAIN/script/tmp-check-wave-closure-log.cjs
liufumingren c3f1c67592 chore(script): 沉淀波次池/报表/库存/订单本地排查脚本
新增一批一次性排查脚本(script/tmp-*.cjs),与仓库既有 script/tmp- 约定保持一致,
覆盖波次池边界与优先级核对、库位/出库报表核对、订单状态与更新范围核验等场景
2026-09-13 15:31:27 +08:00

29 lines
1.1 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

'use strict';
/**
* 只读排查脚本:抓取生产环境 2026-09-12 08:2x 波次自动终结(wave-batch-closure)日志。
*
* 目的:确认 08:25:33 那一轮 candidate/closed 数量,判断是"整表读空"还是"仅这 6 个波次读空"。
* 仅执行 grep / zcat 等只读命令,不做任何写入或清理。
*/
const { loadDeployConfig, runSsh } = require('./deploy-lib.cjs');
function buildRemoteScript() {
return [
'set -uo pipefail',
'D=/root/logs/wms',
'echo "===FILES==="',
'ls -lh "$D" 2>&1 | head -12 || true',
'echo "===NONZERO_CLOSED_0912==="',
'grep -ah "本轮完成 closed=" "$D/wms-web.log.2026-09-12" 2>/dev/null | grep -av "closed=0 " | tail -20 || true',
'echo "===CLOSURE_DETAIL_0912==="',
'grep -ah "波次终结结果" "$D/wms-web.log.2026-09-12" 2>/dev/null | tail -20 || true',
'echo "===WINDOW_0825==="',
'grep -ah "2026-09-12 08:2" "$D/wms-web.log.2026-09-12" 2>/dev/null | grep -a "本轮完成" | tail -10 || true',
].join('\n');
}
const config = loadDeployConfig('production');
console.log(runSsh(config, buildRemoteScript(), { stdio: 'pipe' }));