Files of a campaign that no longer exists are removed, daily and on a purge (#1075) #1093
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/1075-orphan-media-sweep"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #1075.
Summary
purge_campaignis onlydb.delete(campaign); nothing removed the campaign's media. A test showed it.sweep_orphan_campaign_media: removes a campaign folder under either root (private/campaigns/and the publiccampaigns/from before #894) only when all of these hold:What an operator should know
docs/OPERATIONS.mdgains a section. The point that matters: after restoring a database backup older than the media volume, campaigns made since that backup have files and no row, and the sweep removes those files once they are 24 hours unchanged.Changelog
changelog.d/1075-orphan-media-sweep.fixed.mdTest plan
tests/test_orphan_media_sweep.py, 14 tests:44 passed. Lint clean.tests/exportand the watchdog tests:514 passed, 1 failed. The failure was the sweep's own fresh-file test, which exposed a walk-state bug; fixed, and that test passes above.tests/exportwas not re-run after the last two commits, which touch only the sweep.🤖 Generated with Claude Code