Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
[12.0][FIX] Autovacuum cron job #163
Affected versions: 12.0, this was already fixed for 11.0 in #112
I've also added a test case and a migration to update the record for existing installations (since the record is marked as
If, like me, you did not notice it for quite a while and now have hundreds of thousands of old jobs (or even more), running the fixed autovacuum cron job will most likely fail due to memory error or a timeout (depends on the setup, of course). To work around that, I've copied the original AutoVacuum Job Queue cron job record and used this for
deadline = datetime.datetime.now() - datetime.timedelta(days=31) model.search([('date_done', '<=', deadline)], limit=10000).unlink()
and setup to run this Cron job e.g. every 5 minutes to clear away the build-up.