added exclude buckets option
All checks were successful
Publish / Publish Docker Container (push) Successful in 2m27s

This commit is contained in:
2026-01-29 07:57:59 +11:00
parent d6ef9079b6
commit 167a327365
2 changed files with 6 additions and 1 deletions

View File

@@ -6,6 +6,7 @@ DEFAULT = ''
S3_ENDPOINT = os.getenv('S3_ENDPOINT', DEFAULT)
S3_ACCESS_KEY = os.getenv('S3_ACCESS_KEY', DEFAULT)
S3_SECRET_KEY = os.getenv('S3_SECRET_KEY', DEFAULT)
EXCLUDE_BUCKETS = os.getenv('EXCLUDE_BUCKETS', DEFAULT).split(',')
DEFAULT_FILES_TO_KEEP = 5
def validate_env_vars():
@@ -34,6 +35,10 @@ def clean_files():
for bucket in buckets:
try:
bucket_name = bucket['Name']
# Skip excluded buckets
if bucket_name in EXCLUDE_BUCKETS:
print(f'Skipping excluded bucket: {bucket_name}')
continue
print(f'Bucket: {bucket_name}')
# Get all files in the bucket