Expire stored source photos after 7 days, keeping grades forever
Storing originals for Regrade grew the database ~16MB per grade at the upload cap. Photos now expire on a configurable window (default 7 days, counted from last grade so regrading resets it) and the file is VACUUMed so the space is actually returned — clearing the column alone only moves pages to the freelist, which would have made the whole feature a no-op on disk. Grades, thumbnails and measurements are never pruned; a pruned card's Regrade falls back to the existing re-pick path, now with a banner saying why.
This commit is contained in:
parent
633cb98462
commit
602bce8ce3
5 changed files with 127 additions and 0 deletions
|
|
@ -483,6 +483,10 @@ function startRegrade(id, hasImages) {
|
|||
if (hasImages) {
|
||||
runRegrade(id, {});
|
||||
} else {
|
||||
// Say why the picker is opening. Otherwise a Regrade that silently
|
||||
// asks for a photo looks broken — especially on a card that regraded
|
||||
// instantly last week, before its stored photo aged out.
|
||||
banner("This card's photo is no longer stored — pick it again to regrade.");
|
||||
regradeTargetId = id;
|
||||
$('#regrade-file').click();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue