add upsertCleanup to schedule immediate cleanup jobs, cleanup orphaned jobs

This commit is contained in:
Alex Holliday committed 2026-06-17 09:38:21 -07:00
1 parent 699883e0b1
commit 7244b35091
10 files changed
+871 -880

No files matched your search

+3 -2
View File
@@ -274,8 +274,9 @@ export class DBQueueWorker implements IWorker {
await this.jobsRepository.upsertJob(this.toGeoCheckJob(monitor, now));
}
}
await this.jobsRepository.upsertJob(this.toCleanupJob("cleanup-orphaned", now));
await this.jobsRepository.upsertJob(this.toCleanupJob("cleanup-retention", now));
// Both cleanup jobs run immediately on every startup, then once a day
await this.jobsRepository.upsertCleanupJob(this.toCleanupJob("cleanup-orphaned", now));
await this.jobsRepository.upsertCleanupJob(this.toCleanupJob("cleanup-retention", now));
};
// Register worker