-
-
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
Add cleanup jobs as Celery
periodic tasks
#2434
base: main
Are you sure you want to change the base?
Conversation
67372c9
to
893664e
Compare
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.
Hey, we're sitting at the same table. 👋
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.
Tested this and it works on a local database
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.
@bufke to have a look
I'm generally 👍 on this, but let's verify that we aren't trashing anything precious in S3. If the cleanup only affects exports, I'm fine with it staying in this PR, but if it touches irreplaceable things like asset media files, then I'd rather have it split into a separate PR with greater scrutiny
3 periodic tasks have been added:
remove_s3_orphans
: Remove everyexport
in bucket which is not related to a record in a DB.remove_import_tasks
: Remove every import task older than--days
days. (90 by default)remove_asset_snaphots
: Remove every asset snapshot older than--days
days. (90 by default)Closes kobotoolbox/kobo-docker#253
Related to kobotoolbox/kobocat#579