[Koha-bugs] [Bug 31629] Cleanup database needs a flag for removing elastic index entries from background_jobs table

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Oct 24 15:55:08 CEST 2022


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

Nick Clemens <nick at bywatersolutions.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #142501|0                           |1
        is obsolete|                            |

--- Comment #11 from Nick Clemens <nick at bywatersolutions.com> ---
Created attachment 142508
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=142508&action=edit
Bug 31629: Add elasticqueue options to cleanup_database

This patch adds an elasticqueue option to cleanup_database.pl to allow
for purging completed reindexing jobs

To test:
 1 - Enable elastic search in Koha
 2 - perl misc/maintenance/touch_all_items.pl
 3 - Check db and note there are a bunch of elastic reindex jobs
 4 - Update to make them old
     UPDATE background_jobs SET ended_on = '2022-10-01 00:00:00' WHERE type =
'update_elastic_index'
 5 - perl misc/cronjobs/cleanup_database.pl
 6 - Note elasticqueue entry shows in help
 7 - perl misc/cronjobs/cleanup_database.pl --elasticqueue 1 -v
 8 - Note that elasticqueue would have been cleared
 9 - perl misc/cronjobs/cleanup_database.pl --elasticqueue 1 -v --confirm
10 - Note that number of entries deleted is reported
11 - Confirm in staff interface that jobs are gone:
     http://localhost:8081/cgi-bin/koha/admin/background_jobs.pl
     (Uncheck 'Current jobs only')

Signed-off-by: David Nind <david at davidnind.com>
Signed-off-by: Frédéric Demians <f.demians at tamil.fr>

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


More information about the Koha-bugs mailing list