Open puterboy opened 8 months ago
This has been brought up a few times. The problem with deleting the underlying files while the print itself (and the printer) is deleted is file operations are usually expensive (both in terms of time to execute and $ amount). So it's a common practice for the web application to defer this kind of tasks to dev ops.
We are relying GCP storage lifecycle management to do things like this efficiently. You are welcome to come up a mechanism for self-hosted server, as long as it's compatible with the way Obico cloud works.
When you delete elements from the print history, it only changes the entries in the database (db.sqlite3), marking them as 'deleted' but it does NOT delete the actual snapshot and video timelapse storage.
My understanding is that the cloud-based, hosted version "solves" the accumulating storage problem by just blanket deleting the any snapshots and videos older than 6 months, but:
I wrote some klugey bash scripts that you can manually use to delete the snapshots and videos that are marked as deleted in db.sqlite3 -- see: https://github.com/TheSpaghettiDetective/obico-server/issues/762
However, it would seem that the right thing to do would be to include file deletion when 'delete' is selected from the UI. Any reason not to do so?