Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

feat(base): Add automatic media cache cleanups to MediaService #4603

Merged
merged 11 commits into from
Feb 5, 2025

Conversation

zecakeh
Copy link
Collaborator

@zecakeh zecakeh commented Feb 2, 2025

Follow up to #4571, this time we offer to run periodic automatic cleanups. This requires a few more bounds on the types to be able to send them into a new task.

This can be reviewed commit by commit.

…y (de)serializing them

Since it's a common occurrence, it will reduce duplication.

Signed-off-by: Kévin Commaille <[email protected]>
We want to be able to send it to a new task, so the easiest way is to be able to clone it.

Signed-off-by: Kévin Commaille <[email protected]>
…nt Clone

We want to be able to send the store to a new task, so the easiest way is to be able to clone it.

Signed-off-by: Kévin Commaille <[email protected]>
For parity with tokio's JoinHandle.

Signed-off-by: Kévin Commaille <[email protected]>
@zecakeh zecakeh requested a review from a team as a code owner February 2, 2025 11:25
@zecakeh zecakeh requested review from Hywan and removed request for a team February 2, 2025 11:25
Copy link

codecov bot commented Feb 2, 2025

Codecov Report

Attention: Patch coverage is 94.59459% with 6 lines in your changes missing coverage. Please review.

Project coverage is 85.72%. Comparing base (8a76587) to head (ed18c51).
Report is 12 commits behind head on main.

Files with missing lines Patch % Lines
...-base/src/event_cache/store/media/media_service.rs 92.98% 4 Missing ⚠️
crates/matrix-sdk-common/src/executor.rs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4603      +/-   ##
==========================================
+ Coverage   85.70%   85.72%   +0.01%     
==========================================
  Files         292      292              
  Lines       33406    33487      +81     
==========================================
+ Hits        28632    28708      +76     
- Misses       4774     4779       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@Hywan Hywan left a comment

Choose a reason for hiding this comment

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

Well, I had a couple of feedback but they were all addressed by the original code. Nothing to say other than: well done! I'm excited to see this!

@Hywan
Copy link
Member

Hywan commented Feb 4, 2025

Can you please resolve the conflict to unblock the merge please?

@zecakeh
Copy link
Collaborator Author

zecakeh commented Feb 4, 2025

Done.

@Hywan Hywan merged commit 954b16a into matrix-org:main Feb 5, 2025
40 checks passed
@Hywan
Copy link
Member

Hywan commented Feb 5, 2025

Thanks, you rocks 🤘

@zecakeh zecakeh deleted the media-cache-auto-cleanup branch February 5, 2025 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants