chore(web): expose live continuation status
Some checks failed
M6 deployable RC / quick (push) Has been cancelled
M6 deployable RC / chromium (push) Has been cancelled
M6 deployable RC / release (push) Has been cancelled

This commit is contained in:
mes123456
2026-08-30 16:35:42 +08:00
parent 4743e12608
commit 2a304b6576
3 changed files with 165 additions and 2 deletions

View File

@@ -97,7 +97,9 @@ function appendLog(text) {
fs.appendFileSync(abs(supervisorLog), `[${new Date().toISOString()}] ${text}\n`);
}
function writeCheckpoint(payload) {
fs.writeFileSync(abs(checkpointPath), `${JSON.stringify({ schemaVersion: 1, pid: process.pid, updatedAt: new Date().toISOString(), ...payload }, null, 2)}\n`);
const temporaryPath = `${checkpointPath}.tmp-${process.pid}`;
fs.writeFileSync(abs(temporaryPath), `${JSON.stringify({ schemaVersion: 1, pid: process.pid, updatedAt: new Date().toISOString(), ...payload }, null, 2)}\n`);
fs.renameSync(abs(temporaryPath), abs(checkpointPath));
}
const run = (command, args = []) => {
const result = spawnSync(command, args, { cwd: root, encoding: "utf8", maxBuffer: 16 * 1024 * 1024 });