Skip to content

Commit

Permalink
fixup! fixup! look for orphaned items in bucket
Browse files Browse the repository at this point in the history
  • Loading branch information
jvansanten committed Feb 14, 2024
1 parent 5241b1c commit 5dfeff3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion migrations/02_add_archive_count.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
)

in_bucket = sum(1 for _ in bucket.objects.all())
in_archive = connection.execute(sa.select([sa.func.count(Archive.c.avro_archive_id)])).fetchone()
in_archive = connection.execute(sa.select([sa.func.count(Archive.c.avro_archive_id)])).fetchone()[0]
print(f"Bucket: {in_bucket} Archive: {in_archive} orphaned: {in_bucket-in_archive}")


Expand Down

0 comments on commit 5dfeff3

Please sign in to comment.