mirror of
https://github.com/yusufipk/OpenFrame.git
synced 2026-09-11 09:36:08 +00:00
fix(scripts): tell an empty cleanup scan apart from an unreachable one
The cleanup printed one number for expired owners, the count of workspaces it found, so zero meant either that nobody had passed the grace period or that everyone who had owns nothing. The first is normal and the second means media is held alive by rows the cleanup cannot reach, and telling them apart took a hand-written query against production. Both counts are reported now. Bunny and R2 results were also discarded. The workspace row is deleted first, so a refused storage delete leaves media that nothing points at, and nothing recorded that it happened. logCleanupWarnings already exists for this and is now called with the per-workspace result.
This commit is contained in:
@@ -209,6 +209,7 @@ async function main() {
|
||||
console.log(`[r2-orphan-cleanup] Starting (${dryRun ? 'dry-run' : 'delete mode'})`);
|
||||
|
||||
const expiredBillingCleanup = await cleanupExpiredBillingWorkspaces({ dryRun });
|
||||
console.log(`[r2-orphan-cleanup] Expired owners past grace: ${expiredBillingCleanup.owners}`);
|
||||
console.log(
|
||||
`[r2-orphan-cleanup] Expired owner workspaces scanned: ${expiredBillingCleanup.scanned}`
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user