-
Notifications
You must be signed in to change notification settings - Fork 123
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
Commit mass-deletion script #3959
Conversation
|
||
del=todelete.txt | ||
prog=progress.txt | ||
com="complete.txt" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if this value is quoted, does that mean the others should be too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there's no spaces in the values so all are optional for quoting. I've removed the quotes from complete
for consistency
ndone=$((ndone + 1)) | ||
if [[ $skipping = 1 && -n "$last" && $id != $last ]]; then | ||
continue | ||
elif [[ $skipping = 1 && -n "$last" ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it took me a minute to work out why skipping was initially set to 1. I take it that it's because we're looking through the ids until we find the first one after the 'prog' value (if there's one set) and only then do we start processing them? this seems v sensible but might benefit from a brief comment to explain the pattern?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a couple of small comments; looks good to me! I tested success and error conditions locally, though without the curl
command
1c47700
to
1bcc139
Compare
Seen on image-loader, cropper (merged by @andrew-nowak 7 minutes and 34 seconds ago) Please check your changes! |
Seen on metadata-editor, kahuna (merged by @andrew-nowak 7 minutes and 45 seconds ago) Please check your changes! |
Seen on leases (merged by @andrew-nowak 7 minutes and 49 seconds ago) Please check your changes! |
Seen on collections, media-api (merged by @andrew-nowak 7 minutes and 58 seconds ago) Please check your changes! |
Seen on collections (merged by @andrew-nowak 7 minutes and 58 seconds ago) Please check your changes! |
Seen on media-api (merged by @andrew-nowak 7 minutes and 59 seconds ago) Please check your changes! |
Seen on collections (merged by @andrew-nowak 8 minutes and 2 seconds ago) Please check your changes! |
Seen on usage (merged by @andrew-nowak 8 minutes and 15 seconds ago) Please check your changes! |
Seen on thrall (merged by @andrew-nowak 8 minutes and 19 seconds ago) Please check your changes! |
Seen on auth (merged by @andrew-nowak 8 minutes and 27 seconds ago) Please check your changes! |
What does this change?
Store the mass deletion script in repo for reuse and an example of how to create and run mass operation scripts.
How should a reviewer test this change?
Does the README make sense? Is the script easy to understand