Skip to content

Commit

Permalink
Merge branch 'improvement/UTAPI-103/support_reindex_by_account' into …
Browse files Browse the repository at this point in the history
…tmp/octopus/w/8.1/improvement/UTAPI-103/support_reindex_by_account
  • Loading branch information
bert-e committed Jun 12, 2024
2 parents b335381 + c14f39e commit ed42711
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/reindex/s3_bucketd.py
Original file line number Diff line number Diff line change
Expand Up @@ -509,12 +509,12 @@ def log_report(resource, name, obj_count, total_size):

stale_buckets = set()
recorded_buckets = set(get_resources_from_redis(redis_client, 'buckets'))
if not options.bucket and not options.account:
stale_buckets = recorded_buckets.difference(observed_buckets)
elif options.bucket:
if options.bucket:
stale_buckets = { b for b in options.bucket if b not in observed_buckets }
elif options.account:
_log.warning('Stale buckets will not be cleared when using the --account or --account-file flags')
else:
stale_buckets = recorded_buckets.difference(observed_buckets)

_log.info('Found %s stale buckets' % len(stale_buckets))
if options.dry_run:
Expand Down

0 comments on commit ed42711

Please sign in to comment.