Images updated through an API call remain stored to disk
Letting the disk run full (e.g. while syncing with AURA Sync) eventually leads to server errors. The old image should get deleted with an update.
Designs
- Show closed items
- aura #411.0-alpha5 — Capable Capybara 🐖
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- Stefan Nussbaumer assigned to @nnrcschmdt
assigned to @nnrcschmdt
- David Trattnig added P1 bug labels
- David Trattnig changed milestone to %1.0-alpha2 —
Precise Pheasantchanged milestone to %1.0-alpha2 —
Precise Pheasant - Ernesto Rico Schmidt added To Do label
added To Do label
- Ernesto Rico Schmidt added 1 deleted label
added 1 deleted label
- Ernesto Rico Schmidt added Doing label and removed To Do label
- Ernesto Rico Schmidt changed title from Images replaced through an API call remain stored to disk to Images updated through an API call remain stored to disk
changed title from Images replaced through an API call remain stored to disk to Images updated through an API call remain stored to disk
- Owner
This is going to be a two part solution:
- A management command to remove all the site media that is not referenced in the database.
- An updated serializer that ensures that an image is deleted before updating it.
The first part will be done in the main branch, the second will be done in the
aep05
branch.Edited by Ernesto Rico Schmidt 1 1 - David Trattnig marked this issue as related to aura#41 (closed)
marked this issue as related to aura#41 (closed)
- Ernesto Rico Schmidt marked this issue as related to #144 (closed)
marked this issue as related to #144 (closed)
- Ernesto Rico Schmidt added To Do label and removed Doing label
- Ernesto Rico Schmidt added Doing label and removed To Do label
- Owner
To remove all the images in the
MEDIA_ROOT
that are not referenced in the database, there's now a management command:$ poetry run ./manage.py removestaleimages
If you're using docker-compose, you can execute it through:
$ docker compose exec steering poetry run ./manage.py removestaleimages
Or run:
$ docker compose run --rm steering removestaleimages
cc: @nuss
1 - Ernesto Rico Schmidt closed with commit 94a7dae9
closed with commit 94a7dae9
- Ernesto Rico Schmidt removed Doing label
removed Doing label
- Ernesto Rico Schmidt added 1 deleted label
added 1 deleted label
- Ernesto Rico Schmidt mentioned in commit 94a7dae9
mentioned in commit 94a7dae9
- David Trattnig mentioned in issue aura#41 (closed)
mentioned in issue aura#41 (closed)