Skip to content

Commit

Permalink
fixup! fixup! fixup! fixup! fixup! clean up orphaned blobs
Browse files Browse the repository at this point in the history
  • Loading branch information
jvansanten committed Feb 16, 2024
1 parent a73e791 commit 268e40d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion migrations/02_add_archive_count.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,17 @@
)
).returning(Archive.c.uri)
with connection.begin() as transaction:
for row in transaction.execute(statement).fetchall():
key = get_key_for_url(bucket, row["uri"])
print(f"delete {key}")
# bucket.Object(key).delete()
transaction.rollback()
# print(
# statement.compile(
# dialect=engine.dialect, compile_kwargs={"literal_binds": True}
# )
# )
# sys.exit(0)
sys.exit(0)

in_bucket = {summary.key: summary.size for summary in bucket.objects.all()}
print(
Expand Down

0 comments on commit 268e40d

Please sign in to comment.