-
-
Notifications
You must be signed in to change notification settings - Fork 128
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
#579
Open
noliveleger
wants to merge
21
commits into
beta
Choose a base branch
from
cron-cleanup-jobs
base: beta
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
noliveleger
changed the title
Cron cleanup jobs
Add cleanup jobs as Oct 2, 2019
Celery
periodic tasks
# Conflicts: # onadata/apps/logger/management/commands/remove_duplicated_submissions.py # onadata/apps/logger/tasks.py # onadata/libs/utils/gravatar.py # onadata/libs/utils/redis_helper.py # onadata/settings/base.py # onadata/settings/kc_environ.py
# Conflicts: # onadata/libs/utils/redis_helper.py # onadata/settings/base.py # onadata/settings/dev.py # onadata/settings/prod.py
jnm
requested changes
Feb 6, 2024
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.
Not much of a "review", but:
- Could we split the orphan attachments job into a separate PR? That one scares me
- Removing revisions is 👍, but can we set the default to 90 days?
- A Celery task to chip away at the huge amount of old revisions a little bit at a time, perhaps with a limited execution timeout
@bufke to have a look
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
2 periodic tasks have been added:
remove_storage_orphans
: Remove everyattachment
,export
in bucket which is not related to a record in a DB.remove_revisions
: Remove every revision older than--days
days. (0 by default, but forced to 90 in periodic task)Closes kobotoolbox/kobo-docker#253
Related to kobotoolbox/kpi#2434 and #550.
Note by @jnm: there's effectively another (!) type of orphaned attachment in kobocat; consider:
Attachment
s in the database, and both files remain in storage.It's not the intent of this PR to handle this type of orphan, but I wanted to note it here for reference. See #792 for handling of this issue.