Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

✨(back) add a retention date / duration policy #2308

Merged
merged 6 commits into from
Jul 19, 2023

Conversation

polyhb
Copy link
Contributor

@polyhb polyhb commented Jul 2, 2023

Purpose

Clean our unused files and reduce our s3 costs.

Proposal

Adding a retention date behaviour to our videos and classrooms, through a mixin that can be used on any model.
A default retention duration can be set on a playlist, that will be used on the creation of a related object. When a video or a classroom is deleted, we set a default expiration date on the s3 object (that can be defined in the settings).
We also create management commands that will delete outdated classroom / videos once their reached their retention date.

  • retention date mixin
  • management commands
  • widgets to edit retention duration / date

@polyhb polyhb requested review from kernicPanel and lunika July 2, 2023 21:19
@polyhb polyhb self-assigned this Jul 2, 2023
@polyhb polyhb force-pushed the hbaudesson/retention_date branch 3 times, most recently from 70a381c to 4cefce8 Compare July 5, 2023 14:56
@polyhb polyhb requested a review from AntoLC July 5, 2023 14:57
@polyhb polyhb force-pushed the hbaudesson/retention_date branch from 4cefce8 to ac83c31 Compare July 5, 2023 17:57
@AntoLC
Copy link
Contributor

AntoLC commented Jul 6, 2023

@polyhb polyhb force-pushed the hbaudesson/retention_date branch from ac83c31 to a1219e1 Compare July 7, 2023 14:01
@polyhb polyhb requested a review from AntoLC July 7, 2023 16:21
Copy link
Member

@kernicPanel kernicPanel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments, but I still have to make it run.

Copy link
Contributor

@AntoLC AntoLC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I would have try to DRY the RetentionDate widget, they are quite similar between Video and Classroom, otherwise LGTM.

@polyhb polyhb force-pushed the hbaudesson/retention_date branch from cdd913a to 125fb90 Compare July 13, 2023 14:53
@polyhb polyhb requested a review from kernicPanel July 13, 2023 14:53
@polyhb polyhb force-pushed the hbaudesson/retention_date branch from 125fb90 to 370d754 Compare July 18, 2023 17:19
polyhb added 6 commits July 18, 2023 19:27
Adding a retention date behavior to our videos and classrooms,
through a mixin that can be used on any model. When a object is deleted,
this mixin will set an expiration date on the related s3 objects .
Once an object reached its retention date it should be deleted
Adding a retention date/duration field in api responses on
playlist, classroom and video objects.
Add the possibility to add / edit the retention duration playlist
through the playlist form (create and update)
Add the possibility to add / edit the retention date on
video / webinar through a widget
Add the possibility to add / edit the retention date on
classrooms through a widget
@polyhb polyhb force-pushed the hbaudesson/retention_date branch from 370d754 to 463edc6 Compare July 18, 2023 17:30
@polyhb polyhb merged commit bdfdff1 into master Jul 19, 2023
@polyhb polyhb deleted the hbaudesson/retention_date branch July 19, 2023 07:39
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants