We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Problem Statement
I want to keep the history for some models clean based on number of entries.
Describe the solution you'd like
Add an argument to "clean old history" command, to keep just a specified number of entries regardless of age.
Describe alternatives you've considered
Querying history ignoring the latest five (for exemple) entries, then deleting all the rest.
Additional context
Not applicable.
The text was updated successfully, but these errors were encountered:
Thinking about this, I have two suggestions, detailed below:
A new command splitting the clean old history between clean by time and clean by counting, avoiding conditionals to deal with both in same command.
clean old history
clean by time
clean by counting
Current command maybe can be marked as deprecated and turn into an alias to new command (by time).
Add a new parameter (called "keep" for example) and inside _proccess we can slicing the queryset to ignore entries beyond the limit.
_proccess
Are they options interesting?
Personally I think the first can more concise.
Sorry, something went wrong.
No branches or pull requests
Problem Statement
I want to keep the history for some models clean based on number of entries.
Describe the solution you'd like
Add an argument to "clean old history" command, to keep just a specified number of entries regardless of age.
Describe alternatives you've considered
Querying history ignoring the latest five (for exemple) entries, then deleting all the rest.
Additional context
Not applicable.
The text was updated successfully, but these errors were encountered: