Automatically delete old items from the recycle bi...
# news
r
Wrote a small blog post how you can automatically delete old items from the recycle bin. https://richardsoeteman.net/blog/automatically-clear-old-items-from-the-umbraco-recycle-bin/
w
Nice Richard and this is a much better improvement from my old repo & docs example that I done ages ago. I am not sure if it's worth looking at mine for the SeverRole code stuff, to ensure it does not run on replica servers and causes chaos in a load balanced environment. https://github.com/warrenbuckley/TakeOutTheTrash/blob/master/src/TakeOutTheTrash/CleanRoom.cs https://docs.umbraco.com/umbraco-cms/10.latest-lts/reference/scheduling#recurringhostedservice-example
r
Ah did you wrote it Warren? #h5yr. According to the docs my code will only run on the publisher. Think it's best to keep it that way. Don't want frontend servers execute this..
w
Nah exactly, you dont wont frontend servers doing it and then each of them trying to notify that they done the deletion
Ah if the docs are updated and it onlt ever runs on the publisher then your all good then 😄
m
@UMB.FYI
u
Thanks for the tip
m
Looks like @Nik beat me to it 😂
12 Views