refactor(cron): move store into ~/.clawdis/cron

This commit is contained in:
Peter Steinberger
2025-12-13 12:38:08 +00:00
parent 3863fe6412
commit 3e2e4be680
10 changed files with 90 additions and 63 deletions

View File

@@ -19,14 +19,7 @@ export function resolveCronRunLogPath(params: {
}) {
const storePath = path.resolve(params.storePath);
const dir = path.dirname(storePath);
const base = path.basename(storePath);
if (base === "jobs.json") {
return path.join(dir, "runs", `${params.jobId}.jsonl`);
}
const ext = path.extname(base);
const baseNoExt = ext ? base.slice(0, -ext.length) : base;
return path.join(dir, `${baseNoExt}.runs.jsonl`);
return path.join(dir, "runs", `${params.jobId}.jsonl`);
}
const writesByPath = new Map<string, Promise<void>>();