mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-27 19:10:42 +00:00
Sync adabot changes on top of origin/main
Includes: - memory-neo4j: four-phase sleep cycle (dedup, decay, extraction, cleanup) - memory-neo4j: full plugin implementation with hybrid search - memory-lancedb: updates and benchmarks - OpenSpec workflow skills and commands - Session memory hooks - Various CLI and config improvements Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -368,6 +368,9 @@ export function normalizeCronJobInput(
|
||||
stripLegacyTopLevelFields(next);
|
||||
|
||||
if (options.applyDefaults) {
|
||||
if (typeof next.enabled !== "boolean") {
|
||||
next.enabled = true;
|
||||
}
|
||||
if (!next.wakeMode) {
|
||||
next.wakeMode = "now";
|
||||
}
|
||||
|
||||
@@ -202,11 +202,21 @@ export async function run(state: CronServiceState, id: string, mode?: "due" | "f
|
||||
return { ok: true, ran: false, reason: "already-running" as const };
|
||||
}
|
||||
const now = state.deps.nowMs();
|
||||
const due = isJobDue(job, now, { forced: mode === "force" });
|
||||
const forced = mode === "force";
|
||||
const due = isJobDue(job, now, { forced });
|
||||
if (!due) {
|
||||
return { ok: true, ran: false, reason: "not-due" as const };
|
||||
}
|
||||
await executeJob(state, job, now, { forced: mode === "force" });
|
||||
if (forced) {
|
||||
// Fire-and-forget: don't block the caller waiting for job completion
|
||||
void executeJob(state, job, now, { forced }).then(() => {
|
||||
recomputeNextRuns(state);
|
||||
persist(state).catch(() => {});
|
||||
armTimer(state);
|
||||
});
|
||||
return { ok: true, ran: true } as const;
|
||||
}
|
||||
await executeJob(state, job, now, { forced });
|
||||
recomputeNextRuns(state);
|
||||
await persist(state);
|
||||
armTimer(state);
|
||||
|
||||
Reference in New Issue
Block a user