Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Breaking off this issue from #1662752: Maillog log table size escalation. Patch forthcoming based on code in Comment #10.
Comment | File | Size | Author |
---|---|---|---|
#6 | maillog_row_limit-3218598-6.patch | 1.94 KB | TommyK |
|
Comments
Comment #2
TommyK CreditAttribution: TommyK as a volunteer commentedI've created a patch based on the code from the code in #1662752-10: Maillog log table size escalation. The only thing I changed was the `id` column name as the module has changed since the code was posted.
Credit to the original contributor.
Comment #3
robcarrThe patch seems to work. Thanks for posting the patch: +1 for RTBC
The only problem I've observed is that the initial cron run can run out of resource/memory/time if the maillog table is quite big. I had 70,000 rows to start with, so had to manually trim the table to something close to the limit before I could get cron to run.
Comment #4
DamienMcKennaThis mirrors the code from dblog.module, which was a great idea.
I need to manually test it, but this is probably RTBC.
Comment #5
DamienMcKennaOne minor thing - it needs a hook_uninstall() line to delete the "maillog_row_limit" variable.
Comment #6
TommyK CreditAttribution: TommyK as a volunteer commentedadd a
hook_uninstall()
line for themaillog_row_limit
variable