openfun / marsha

:clapper: An opensource LTI Learning Content Management System (LCMS)
MIT License
104 stars 24 forks source link

♻️(back) refacto delete videos from S3 #2509

Closed polyhb closed 7 months ago

polyhb commented 7 months ago

Purpose

The way we handle the "delete" videos on AWS is not optimal and does not work on the newly added storage Scaleway. We need to find a simpler way to not instantly delete files in S3 (but delete them after a certain amount of time) that can work on both S3 storages.

Proposal

To simplify the process, we will move the deleted files into a deleted directory that will have one lifecycle rule that will delete the files after 21 days. The "move" can takes some times so we want it to be run by a task queue like Celery (which is also used by Joanie)