fix(cron): re-arm timer in finally to survive transient errors (#9948)
This commit is contained in:
committed by
GitHub
parent
313e2f2e85
commit
40e23b05f7
@@ -48,10 +48,11 @@ export async function onTimer(state: CronServiceState) {
|
||||
await runDueJobs(state);
|
||||
recomputeNextRuns(state);
|
||||
await persist(state);
|
||||
armTimer(state);
|
||||
});
|
||||
} finally {
|
||||
state.running = false;
|
||||
// Always re-arm so transient errors (e.g. ENOSPC) don't kill the scheduler.
|
||||
armTimer(state);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user