- Issue created by @eelkeblok
- 🇳🇱Netherlands eelkeblok Netherlands 🇳🇱
Added a quick implementation using Cursor. I am not convinced the "just delete everything older than x" through the entity interface is a great idea. Especially if there is a large backlog I don't think it will finish in a reasonable amount of time. But maybe I'm mistaken, needs a little more testing (like with a prod database from my example project :) ).
- 🇳🇱Netherlands eelkeblok Netherlands 🇳🇱
As expected, this didn't go flawlessly, I ran into out of memory exceptions.
- I added a batching operation, deleting 100 log entries at a time, with an cache clear for the entity storage in between.
- I added a time limit, so the hook cron will not run longer than 10 seconds.
Typically, I would say this is enough for most setups. Maybe it is worth mentioning somewhere in the documentation that if you consistently get warnings that the time limit was exceeded, you need to either increase the frequency the cron hook is ran (maybe with a reference to ultimate cron) or reduce the amount of log entries created.
- 🇳🇱Netherlands eelkeblok Netherlands 🇳🇱
I just found 📌 Support OOP hooks Active and noticed there that currently most hooks are implemented using the OO class_resolver pattern, which makes the official OO hooks conversion much easier. So we should at least change that, possibly do it all in one go if 📌 Support OOP hooks Active lands first.
- 🇧🇪Belgium svendecabooter Gent
@eelkeblok: I have merged issue 📌 Support OOP hooks Active , so this functionality could be implemented with OOP hooks in mind.
Haven't reviewed the code yet, but described functionality looks promising :) - 🇳🇱Netherlands eelkeblok Netherlands 🇳🇱
🙌 Excellent. I'll see if I can take a crack at that soon.
- 🇳🇱Netherlands eelkeblok Netherlands 🇳🇱
Refactored to use the new OO hook pattern.