-
-
Notifications
You must be signed in to change notification settings - Fork 184
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
Asset snapshot cleanup task #4901
Conversation
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'm also wondering if I should be removing the existing management command code (here for snapshots and here for the DeleteBaseCommand class) once I replace the other task (removing old import tasks) that relied on it.
Yeah for sure. Either now or later. We may want to consider our alternative abstractions like RemoveBaseCommand but not until we have more code to actually abstract.
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.
Approved pending consideration of my comments.
Checklist
Description
Adds regular asset snapshot cleanup maintenance task. Reworks existing test to make sure latest versioned snapshots are preserved.
Notes
I would appreciate feedback on organization here. KPI already has a tasks.py file for celery tasks, and the new
remove_old_snapshots()
is not a celery task, so I didn't want to put it there. Currently it is in a new maintenance_tasks.py file. I was thinking of putting them both in a tasks folder. One could be celery_tasks.py and the other could stay as maintenance_tasks.py.Down the line, I'm also wondering if I should be removing the existing management command code (here for snapshots and here for the DeleteBaseCommand class) once I replace the other task (removing old import tasks) that relied on it.
Related issues
Partially replaces work in #2434