DistributedProofreaders / dproofreaders

Distributed Proofreaders is a web application intended to ease the process of converting public domain books into e-texts.
https://www.pgdp.net
GNU General Public License v2.0
47 stars 28 forks source link

Prune job logs -- keep 13 months worth #1246

Closed cpeel closed 3 months ago

cpeel commented 3 months ago

The job_logs table stores when jobs run and is primarily automodify.php right now. It currently grows unbounded and we have 20 years of data. There's no real use in keeping it for that long though. At best being able to see how long something took to run a year ago seems generous. We could probably even get away with just a month of data.

This PR takes a generous view and just saves the past 13 months of data. 13 months is better than 20 years.

Aside: it was awesome how easy it was to create a new background job with the new class, so much boilerplate gone!