-
Notifications
You must be signed in to change notification settings - Fork 1
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 command to delete stale elastic indices #12
base: main
Are you sure you want to change the base?
Conversation
@GROwen when doing |
Co-authored-by: Nick Santamaria <[email protected]>
if diffInDays > age { | ||
// Add helper function to compute hash from k. | ||
hash := strings.Split(k, "--")[0] | ||
project, err := hashes.LookupProjectFromHash(hash) |
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.
@nicksantamaria I'd like to refactor this so that indices are grouped by project.
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.
You could build up a map of elements here, sort the map with something like gosortmap, then iterate over the sorted map in a separate loop.
No description provided.