feat(cron): always post isolated summaries to main

This commit is contained in:
Peter Steinberger
2025-12-13 11:33:46 +00:00
parent a5f51eadf1
commit 8d1e73edc7
5 changed files with 29 additions and 11 deletions

View File

@@ -402,8 +402,8 @@ export class CronService {
nextRunAtMs: job.state.nextRunAtMs,
});
if (summary && job.isolation?.postToMain) {
const prefix = job.isolation.postToMainPrefix?.trim() || "Cron";
if (summary && job.sessionTarget === "isolated") {
const prefix = job.isolation?.postToMainPrefix?.trim() || "Cron";
this.deps.enqueueSystemEvent(`${prefix}: ${summary}`);
if (job.wakeMode === "now") {
this.deps.requestReplyHeartbeatNow({ reason: `cron:${job.id}:post` });