Skip to content

Commit

Permalink
fix: pruning should load temp images from env
Browse files Browse the repository at this point in the history
  • Loading branch information
db0 committed Mar 6, 2024
1 parent f69babd commit 7cadf36
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions prune_stale_images.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import time
import os
from concurrent.futures import ThreadPoolExecutor
from datetime import datetime, timedelta, timezone

Expand All @@ -8,10 +9,13 @@

load_dotenv()


r2_transient_account = os.getenv(
"R2_TRANSIENT_ACCOUNT",
"https://a223539ccf6caa2d76459c9727d276e6.r2.cloudflarestorage.com",
)
sr3 = boto3.resource(
"s3",
endpoint_url="https://a223539ccf6caa2d76459c9727d276e6.r2.cloudflarestorage.com",
endpoint_url=r2_transient_account,
)
while True:
try:
Expand Down

0 comments on commit 7cadf36

Please sign in to comment.