Created
August 26, 2013 21:51
-
-
Save cooncesean/6347105 to your computer and use it in GitHub Desktop.
remove pending .mov keys
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from boto.s3.connection import S3Connection | |
from boto.s3.key import Key | |
from django.conf import settings | |
PROCESSED_PATH = 'uploads/videos/processed/' | |
# Remove .mov keys in PROCESSED DIR | |
for key in bucket.get_all_keys(prefix=PROCESSED_PATH): | |
if key.name != PROCESSED_PATH and key.name.split('.')[-1] == 'mov': | |
print key | |
key.delete() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment