chore(web): expose live continuation status
This commit is contained in:
@@ -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 });
|
||||
|
||||
Reference in New Issue
Block a user