mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-03 03:03:24 -04:00
fix(runtime): guard cleanup and preserve skipped cron jobs
This commit is contained in:
@@ -168,7 +168,7 @@ function moveToFinished(session: ProcessSession, status: ProcessStatus) {
|
||||
session.child.stderr?.destroy?.();
|
||||
|
||||
// Remove all event listeners to prevent memory leaks
|
||||
session.child.removeAllListeners();
|
||||
session.child.removeAllListeners?.();
|
||||
|
||||
// Clear the reference
|
||||
delete session.child;
|
||||
|
||||
@@ -70,9 +70,7 @@ function applyJobResult(
|
||||
}
|
||||
|
||||
const shouldDelete =
|
||||
job.schedule.kind === "at" &&
|
||||
job.deleteAfterRun === true &&
|
||||
(result.status === "ok" || result.status === "skipped");
|
||||
job.schedule.kind === "at" && job.deleteAfterRun === true && result.status === "ok";
|
||||
|
||||
if (!shouldDelete) {
|
||||
if (job.schedule.kind === "at") {
|
||||
|
||||
Reference in New Issue
Block a user