ankidroid / Anki-Android

AnkiDroid: Anki flashcards on Android. Your secret trick to achieve superhuman information retention.
GNU General Public License v3.0
8.75k stars 2.24k forks source link

Schedule periodic maintenance on acralyzer host #15471

Open mikehardy opened 9 months ago

mikehardy commented 9 months ago

Went to clean up the acralyzer instance and it was a bit of a mess - these items need periodic scheduling:

Consequence of not doing this is that the 25GB of available storage fills - that's important to mention.

The disk appears to fill about once every 6 months

david-allison commented 9 months ago

30 days is a little too aggressive for us. Could we up this to 90 when this is implemented

github-actions[bot] commented 6 months ago

Hello 👋, this issue has been opened for more than 3 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically

github-actions[bot] commented 3 months ago

Hello 👋, this issue has been opened for more than 3 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically

github-actions[bot] commented 2 weeks ago

Hello 👋, this issue has been opened for more than 3 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically

mikehardy commented 2 weeks ago

There's no API to do this, but now that I know delete of bug table entries cascades, I believe it's possible to write some SQL that does this and runs a nightly purge

rough first thought on sql taking into account that we have a bug -> report -> stacktrace cascade but the date information is only available on the report table

1- delete from bug where no reports meet criteria that reports.bug_id = bug.id and reports.date is newer than 2- delete from reports where date is older than

basic idea being first delete whole data tree (bug is root) where no reports are new enough, so we don't orphan bug table entries, then after making sure we won't create orphan bug entries, clean up reports table in general

stacktrace table entries will cascade delete from reports, so those won't orphan