Skip to content

Instantly share code, notes, and snippets.

@lukemarsden
Created July 1, 2011 12:58
Show Gist options
  • Save lukemarsden/1058494 to your computer and use it in GitHub Desktop.
Save lukemarsden/1058494 to your computer and use it in GitHub Desktop.
victimsToPrune = []
while len(victimsToPrune) < 10 and suggestedDeletions:
victimsToPrune.append(suggestedDeletions.pop())
for victim in victimsToPrune:
d.addCallback(lambda ign: debug(victim, msg='start'))
d.addCallback(lambda ign:
self._snapshotManipulator.prune(victim.key, local_forest))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment