1
0
Fork 0
mirror of https://akkoma.dev/AkkomaGang/akkoma.git synced 2025-01-25 15:09:34 +00:00
Commit graph

2 commits

Author SHA1 Message Date
Oneric
e8bf4422ff Delay attachment deletion
Otherwise attachments have a high chance to disappear with akkoma-fe’s
“delete & redraft” feature when cleanup is enabled in the backend. Since
we don't know whether a deletion was intended to be part of a redraft
process or even if whether the redraft was abandoned we still have to
delete attachments eventually.
A thirty minute delay should provide sufficient time for redrafting.

Fixes: https://akkoma.dev/AkkomaGang/akkoma/issues/775
2025-01-03 20:49:11 +01:00
Oneric
bcfbfbcff5 Don't try to cleanup remote attachments
The cleanup attachment worker was run for every deleted post,
even if it’s a remote post whose attachments we don't even store.
This was especially bad due to attachment cleanup involving a
particularly heavy query wasting a bunch of database perf for nil.

This was uncovered by comparing statistics from
https://akkoma.dev/AkkomaGang/akkoma/issues/784 and
https://akkoma.dev/AkkomaGang/akkoma/issues/765#issuecomment-12256
2025-01-03 20:48:46 +01:00