pub fn prune_snapshots(
snapshots_dir: &Path,
channel: &str,
) -> Result<usize, SnapshotError>Expand description
Delete oldest snapshots for channel until at most
MAX_SNAPSHOTS_PER_CHANNEL remain. Returns the number pruned.
Pruning errors on a specific entry are logged and skipped rather than
aborting the whole sweep (one bad dir shouldn’t keep storage growing).