[Bug 32093] New: cleanup_database.pl bg-jobs parameter should be bg-days
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32093 Bug ID: 32093 Summary: cleanup_database.pl bg-jobs parameter should be bg-days Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Command-line Utilities Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: robin@catalyst.net.nz The help says: --bg-days DAYS Purge all finished background jobs this many days old. Defaults to 1 if no DAYS provide d. The script checks: 'bg-jobs:i' => \$background_days, We should use bg-days -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32093 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |Academy -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32093 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|koha-bugs@lists.koha-commun |katrin.fischer@bsz-bw.de |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32093 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|ASSIGNED |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32093 --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 143921 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=143921&action=edit Bug 32093: Make help and code match for bg-days in cleanup_database.pl There as a mismatch between the parameter name in documentation (bg-days) and what was checked in the code (bg-jobs). This makes both match. To test: * Apply patch * Make sure you have some background_jobs older than one day * Verify the help of the script documents the parameter bg-days * Run the cleanup_database.pl job Example: ./misc/cronjobs/cleanup_database.pl --bg-days --confirm -v * Verify there are no errors and the lines have been deleted as expected -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32093 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32093 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|Academy |rel_22_11_candidate Depends on| |31969 --- Comment #2 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- As this new option has not been released yet, we should push this before release so people can have it right from the beginning. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31969 [Bug 31969] Options for cleanup_database.pl to remove finished jobs from the background job queue -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32093 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32093 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #143921|0 |1 is obsolete| | --- Comment #3 from David Nind <david@davidnind.com> --- Created attachment 143930 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=143930&action=edit Bug 32093: Make help and code match for bg-days in cleanup_database.pl There as a mismatch between the parameter name in documentation (bg-days) and what was checked in the code (bg-jobs). This makes both match. To test: * Apply patch * Make sure you have some background_jobs older than one day * Verify the help of the script documents the parameter bg-days * Run the cleanup_database.pl job Example: ./misc/cronjobs/cleanup_database.pl --bg-days --confirm -v * Verify there are no errors and the lines have been deleted as expected Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32093 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #4 from David Nind <david@davidnind.com> --- Testing notes (using KTD): 1. To create some background jobs that could be purged (I'm sure there are quicker ways), I: - Enabled Elasticsearch (SearchEngine) - Reindexed (koha-elasticsearch --rebuild -d -b -a kohadev) - Edited some records (changed titles) - Updated the dates in the database for background jobs so that they are more than 1 day old (wasn't sure what date is used to trigger pruging): . select * from background_jobs; . update background_jobs set enqueued_on = "2022-11-13 20:09:00"; . update background_jobs set started_on = "2022-11-13 20:09:00"; . update background_jobs set ended_on = "2022-11-13 20:10:00"; - Edited a few more records (changed title) 2. Ran the cleanup_database.pl job. 3. Checked that the older background jobs were deleted in the database and UI. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32093 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32093 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #143930|0 |1 is obsolete| | --- Comment #5 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 144020 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=144020&action=edit Bug 32093: Make help and code match for bg-days in cleanup_database.pl There as a mismatch between the parameter name in documentation (bg-days) and what was checked in the code (bg-jobs). This makes both match. To test: * Apply patch * Make sure you have some background_jobs older than one day * Verify the help of the script documents the parameter bg-days * Run the cleanup_database.pl job Example: ./misc/cronjobs/cleanup_database.pl --bg-days --confirm -v * Verify there are no errors and the lines have been deleted as expected Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32093 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |22.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32093 --- Comment #6 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 22.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org