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

@@ -1487,21 +1487,10 @@ export async function startGatewayServer(
);
break;
}
const p = params as { id?: string; limit?: number };
if (!p.id && cronStorePath.endsWith(`${path.sep}jobs.json`)) {
respond(
false,
undefined,
errorShape(
ErrorCodes.INVALID_REQUEST,
"cron.runs requires id when using jobs.json store layout",
),
);
break;
}
const p = params as { id: string; limit?: number };
const logPath = resolveCronRunLogPath({
storePath: cronStorePath,
jobId: p.id ?? "all",
jobId: p.id,
});
const entries = await readCronRunLogEntries(logPath, {
limit: p.limit,