feat: schedule pricing job retention cleanup
Quality / test (push) Canceled after 0s

Schedule configurable completed pricing-job cleanup in the worker, broaden repository cleanup across sellers, add unit and integration coverage, and update pricing operational documentation.
This commit is contained in:
2026-09-09 22:32:04 -04:00
parent 660690bf34
commit 76e40d7289
8 changed files with 126 additions and 14 deletions
@@ -164,12 +164,11 @@ export function createPricingRefreshJobRepository(db) {
});
},
async purgeCompletedBefore(sellerId, cutoff) {
async purgeCompletedBefore(cutoff) {
const deleted = await db
.delete(pricingRefreshJobs)
.where(
and(
eq(pricingRefreshJobs.sellerId, sellerId),
eq(pricingRefreshJobs.status, "COMPLETED"),
lte(pricingRefreshJobs.updatedAt, cutoff),
),