[Koha-bugs] [Bug 35948] cleanup_database.pl should remove not only finished background jobs

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Jan 30 15:49:22 CET 2024


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35948

--- Comment #2 from Fridolin Somers <fridolin.somers at biblibre.com> ---
Created attachment 161646
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=161646&action=edit
Bug 35948: cleanup_database.pl should remove not only finished background jobs

Bug 31969 changed cleanup_database.pl so it removes only finished background
jobs.
But old background jobs with other statuses will never be removed.

So we should use "enqueued_on" instead of "ended_on"
and no filter on status

Test plan :
1) Create a background job with for example a batch item modification
2) Simulate ancien job via SQL :
update background_jobs set status='failed',enqueued_on=DATE_SUB(NOW(),INTERVAL
10 DAY) where id=X
3) Run misc/cronjobs/cleanup_database.pl --jobs-days 9 --jobs-type all -v
--confirm
4) Check the job is removed

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list