mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-20 09:31:35 +00:00
feat(cron): serve cron run history from the task ledger
Cron executions now write full-fidelity task_runs rows (detail_json column, store-key scoped) and cron.runs/CLI/task-maintenance read from the ledger; legacy cron_run_logs dual-write stays as a revert safety net. Existing history auto-imports at first state-DB open (verified against a production DB copy: 2750/2750 rows, byte-identical parity, idempotent). Startup crash recovery restores finished runs from finalized ledger rows instead of reporting synthetic interruptions. Part 1 of 2 for #106041.
This commit is contained in:
@@ -64,7 +64,7 @@ async function waitForCronRunCompletion(params: {
|
||||
timeoutMs: number;
|
||||
pollIntervalMs: number;
|
||||
}): Promise<CronRunLogEntryResult> {
|
||||
// Poll the run log rather than cron.run because completion state is written asynchronously.
|
||||
// Poll the task ledger rather than cron.run because completion state is written asynchronously.
|
||||
const startedAt = Date.now();
|
||||
for (;;) {
|
||||
const page = (await callGatewayFromCli("cron.runs", params.opts, {
|
||||
|
||||
Reference in New Issue
Block a user