mirror of
https://github.com/suitenumerique/drive.git
synced 2026-08-17 20:15:40 +02:00
An item is considered hard deleted in two cases: - hard deletion was forced by the user while sitting in the trashbin - the item was only soft deleted but the trashbin retention period has expired Thus, a hard deleted item still exists in database with an associated file in S3. What the asynchronous task is doing is another action: permanently removing the item from database and its associated file from S3. I propose to rename this action "purge". We refactor the task to improve its resilience: - don't recursively generate asynchronous tasks. We are already outside of a request cycle so we don't need to spawn new asynchronous tasks. - purge the subtree from the bottom to the top: leaves first, root last. - fail fast if something goes wrong and make sure the task will continue when we retry it.