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
Mark Felder
13d79c281f
Make attachment cleanup jobs a noop if the setting is disabled.
2021-01-28 14:42:20 -06:00
Haelwenn (lanodan) Monnier
c4439c630f
Bump Copyright to 2021
...
grep -rl '# Copyright © .* Pleroma' * | xargs sed -i 's;Copyright © .* Pleroma .*;Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/ >;'
2021-01-13 07:49:50 +01:00
Mark Felder
86dcfb4eb9
More places we should be using Upload.base_url
2021-01-08 17:32:42 -06:00
Maksim Pechnikov
a8d967762e
migrate to oban 2.0-rc1
2020-06-23 15:09:01 +03:00
Maksim Pechnikov
b023110799
fixed a visibility of functions
2020-06-15 20:48:22 +03:00
Maksim Pechnikov
2e8a236cef
fix invalidates media url's
2020-06-14 21:02:57 +03:00
Maksim Pechnikov
cb40602a16
added media proxy invalidation
2020-05-15 21:39:42 +03:00
Haelwenn (lanodan) Monnier
6da6540036
Bump copyright years of files changed after 2020-01-07
...
Done via the following command:
git diff fcd5dd259a
--stat --name-only | xargs sed -i '/Pleroma Authors/c# Copyright © 2017-2020 Pleroma Authors <https:\/\/pleroma.social\/>'
2020-03-02 06:08:45 +01:00
Roman Chvanikov
d18a2e4e36
Add test for custom base_url when deleting an attachment
2020-01-28 17:22:24 +03:00
Roman Chvanikov
804a702f97
Fix base_url string trimming
2020-01-28 17:07:46 +03:00
Roman Chvanikov
dea968463d
Add logging
2020-01-28 16:52:20 +03:00
Roman Chvanikov
7f78bd7e37
Fix __MODULE__ usage
2020-01-28 16:38:44 +03:00
Roman Chvanikov
eb4870e1cd
Remove unused var
2020-01-28 03:54:54 +03:00
Roman Chvanikov
52e08ec9fd
explicitly describe perform op in AttachmentsClenupWorker
2020-01-28 03:52:50 +03:00
Roman Chvanikov
86c4b76bf0
Fix typo
2020-01-27 04:01:50 +03:00
Roman Chvanikov
cde828ff7d
Fix credo warning
2020-01-19 22:09:47 +03:00
Roman Chvanikov
d6a532bf0f
Delete attachments asynchronously
2020-01-19 19:45:20 +03:00