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 revision cleanup task #924

Merged
merged 3 commits into from
May 1, 2024
Merged

Add revision cleanup task #924

merged 3 commits into from
May 1, 2024

Conversation

jamesrkiger
Copy link
Contributor

@jamesrkiger jamesrkiger commented Apr 30, 2024

Adds a daily perform_maintenance Celery task and implements cleanup for old django-reversion revisions based on work in #579 .

The actual revision cleanup work is drastically simplified here. The django admin command used in the previous PR was based on django-reversion's own admin command and was made much more complicated than necessary for our use case because of the abstraction the django-reversion command affords. The tables for revisions and versions in Kobocat are potentially enormous, so I decided that the simplest approach was the best, rather than filtering and iterating over hundreds of millions of rows.

@jamesrkiger jamesrkiger changed the base branch from main to beta April 30, 2024 18:58
@jamesrkiger jamesrkiger changed the title draft: Add revision cleanup task Add revision cleanup task May 1, 2024
@jamesrkiger jamesrkiger requested a review from bufke May 1, 2024 12:43
Copy link
Contributor

@bufke bufke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@bufke bufke merged commit 91cd9ab into beta May 1, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants