-
Notifications
You must be signed in to change notification settings - Fork 1
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
MAP-1781 Cleanup Access Logs more than 3 months old #2408
Conversation
6ae1fce
to
8064004
Compare
I think three months is too short tbh, I've had to debug issues with older moves before |
AccessLog.where('timestamp < ?', cutoff_date).limit(1000).delete_all | ||
end | ||
end | ||
end |
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 would suggest possibly adding a test for this task but it's up to you
424fb68
to
815c129
Compare
Agree, minimum 12 months imo |
Suspect IssuesThis pull request was deployed and Sentry observed the following issues:
Did you find this useful? React with a 👍 or 👎 |
Jira link
https://dsdmoj.atlassian.net/browse/MAP-1781
What?
Adds a daily cronjob to delete stale Access Logs.
DELETE can be a very expensive operation, so we do this in batches of 1000.
Why?
200k Access Logs are created every day.
We use them for debugging production issues, so it should be okay to remove anything older than three months.