misskey icon indicating copy to clipboard operation
misskey copied to clipboard

Automatically clean up old remote files

Open keeakita opened this issue 3 years ago โ€ข 1 comments

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

keeakita avatar Nov 28 '22 00:11 keeakita

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.

Trif4 avatar Nov 28 '22 18:11 Trif4

triage: ไธ€ๅฎšๆœŸ้–“็ตŒ้Žใ—ใŸใƒชใƒขใƒผใƒˆใƒ•ใ‚กใ‚คใƒซใฎใ‚ญใƒฃใƒƒใ‚ทใƒฅใ‚’ๅฎšๆœŸ็š„ใซๅ‰Š้™คใ™ใ‚‹ๆฉŸ่ƒฝ

ๆ™‚้–“ใฏๆœ‰้™ ใƒ‡ใ‚ฃใ‚นใ‚ฏใ‚‚ๆœ‰้™

Sayamame-beans avatar Jun 14 '24 11:06 Sayamame-beans