mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 05:01:23 +00:00
Cron: persist manual run marker before unlock (#23993)
* Cron: persist manual run marker before unlock * Cron tests: relax wakeMode now microtask wait after run lock persist
This commit is contained in:
@@ -226,6 +226,9 @@ export async function run(state: CronServiceState, id: string, mode?: "due" | "f
|
||||
// (`list`, `status`) stay responsive while the run is in progress.
|
||||
job.state.runningAtMs = now;
|
||||
job.state.lastError = undefined;
|
||||
// Persist the running marker before releasing lock so timer ticks that
|
||||
// force-reload from disk cannot start the same job concurrently.
|
||||
await persist(state);
|
||||
emit(state, { jobId: job.id, action: "started", runAtMs: now });
|
||||
const executionJob = JSON.parse(JSON.stringify(job)) as typeof job;
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user