Automatically clean up old remote files
Summary
I would like to have a background task that periodically deletes old files that have been cached from other servers. Right now this can only be done directly via CleanRemoteFilesProcessorService, and it deletes everything.
I'd like to have a way to delete all files older than a certain age. For example, delete remote files older than 7 days. This should allow admins to save some space. It'd also be nice if this could be scheduled to run in the background, rather than being a button in the UI like CleanRemoteFilesProcessorService is.
I imagine implementing this would take several parts, though I'm not super familiar with Misskey's architecture yet:
- [ ] add a new processor
- [ ] make it scheduled / run automatically
- [ ] add configuration in file or UI for how long to keep files for
Just for clarity, there is currently a mechanism in place that deletes old files for remote users when they exceed their Drive storage limit (default 32 MB). However, if Misskey never sees a user post a file again, their cached files will never be deleted automatically from what I can tell, so I agree this feature is necessary in conjunction with the current storage limit system.
triage: ไธๅฎๆ้็ต้ใใใชใขใผใใใกใคใซใฎใญใฃใใทใฅใๅฎๆ็ใซๅ้คใใๆฉ่ฝ
ๆ้ใฏๆ้ ใใฃในใฏใๆ้