Add configurable history and storage retention policies
This commit is contained in:
@@ -120,9 +120,7 @@ async function runTick(): Promise<void> {
|
||||
try { await processJob(job); }
|
||||
catch { hold(job, 'Maintenance check failed; waiting for the next check.'); }
|
||||
}
|
||||
// Update attempts are also durable suppression evidence; never age them into an automatic retry.
|
||||
db().prepare(`DELETE FROM maintenance_jobs WHERE kind != 'update' AND finished_at < ? AND state IN ('done','failed','cancelled')`)
|
||||
.run(new Date(Date.now() - 30 * 24 * HOUR).toISOString());
|
||||
|
||||
}
|
||||
async function processJob(job: MaintenanceJob): Promise<void> {
|
||||
const server = getServer(job.server);
|
||||
|
||||
Reference in New Issue
Block a user