feat(cron): post isolated summaries

This commit is contained in:
Peter Steinberger
2025-12-13 12:09:15 +00:00
parent 32cd1175fb
commit c02613e15f
12 changed files with 462 additions and 52 deletions

View File

@@ -73,6 +73,7 @@ describe("cron run log", () => {
action: "finished",
status: "error",
error: "nope",
summary: "oops",
});
await appendCronRunLog(logPath, {
ts: 3,
@@ -93,6 +94,12 @@ describe("cron run log", () => {
const lastOne = await readCronRunLogEntries(logPath, { limit: 1 });
expect(lastOne.map((e) => e.ts)).toEqual([3]);
const onlyB = await readCronRunLogEntries(logPath, {
limit: 10,
jobId: "b",
});
expect(onlyB[0]?.summary).toBe("oops");
await fs.rm(dir, { recursive: true, force: true });
});
});