Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add --verbose flag to always report status #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion s3wipe
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ def getArgs():
parser.add_argument("--delbucket",
help="If S3 path is a bucket path, delete the bucket also",
action='store_true')
parser.add_argument("--verbose",
help="Print more frequent status messages",
action='store_true')

return parser.parse_args()

Expand Down Expand Up @@ -126,7 +129,9 @@ def deleter(args, rmQueue, numThreads):
rmKeys = []

# Print some progress info
if random.randint(0,numThreads) == numThreads and not args.dryrun:
if args.verbose or \
random.randint(0, numThreads) == numThreads and \
not args.dryrun:
logger.info("Deleted %s out of %s keys found thus far.",
keysDeleted.value, keysFound.value)

Expand Down