aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--license_protected_downloads/management/commands/s3_purge.py8
-rw-r--r--settings.py1
2 files changed, 2 insertions, 7 deletions
diff --git a/license_protected_downloads/management/commands/s3_purge.py b/license_protected_downloads/management/commands/s3_purge.py
index 2b4e009..d12810e 100644
--- a/license_protected_downloads/management/commands/s3_purge.py
+++ b/license_protected_downloads/management/commands/s3_purge.py
@@ -6,12 +6,6 @@ import datetime
from boto.s3.connection import S3Connection
logging.getLogger().setLevel(logging.INFO)
-EXCLUDE_FILES = (
- 'releases/',
- '96boards/',
- 'snapshots/components/toolchain/infrastructure',
- 'snapshots/components/toolchain/gcc-linaro'
-)
class Command(BaseCommand):
@@ -40,7 +34,7 @@ class Command(BaseCommand):
now = self.x_days_ago(int(options['days']))
for key in bucket_key:
- if not any(map(key.name.startswith, EXCLUDE_FILES)):
+ if not any(map(key.name.startswith, settings.S3_PURGE_EXCLUDES)):
if key.last_modified < now:
if options['dryrun']:
logging.info('Will delete %s', key.name)
diff --git a/settings.py b/settings.py
index ac74584..54d4665 100644
--- a/settings.py
+++ b/settings.py
@@ -15,6 +15,7 @@ CSS_PATH = os.path.join(ROOT_PATH, "css")
TEMPLATES_PATH = os.path.join(ROOT_PATH, "templates")
TEXTILE_FALLBACK_PATH = os.path.join(TEMPLATES_PATH, "textile_fallbacks")
REPORT_CSV = os.path.join(PROJECT_ROOT, "download_report.csv")
+S3_PURGE_EXCLUDES = []
ADMINS = (
('linaro-infrastructure', 'linaro-infrastructure-errors@linaro.org'),