6565328092
This patch adds background queue options to cleanup_database.pl to allow for purging completed background jobs. --bg-jobs DAYS Purge all finished background jobs this many days old. Defaults to 1 if no DAYS provided. --bg-type TYPE What type of background job to purge. Defaults to "update_elastic_index" if omitted Specifying "all" will purge all types. Repeatable. To test: 1 - Enable elastic search in Koha 2 - perl misc/maintenance/touch_all_items.pl 3 - Generate an number of diffrent types of bg-jobs (eg batch_hold_cancel, batch_biblio_record_deletion, batch_item_record_deletion) 4 - Check db and note there are a bunch of diffrent jobs 5 - Update to make them old UPDATE background_jobs SET ended_on = '2022-10-01 00:00:00', status='finished' 6 - perl misc/cronjobs/cleanup_database.pl 7 - Note bg-jobs entry shows in help 8 - perl misc/cronjobs/cleanup_database.pl --bg-jobs 1 -v 9 - Note that elasticqueue would have been cleared 10 - perl misc/cronjobs/cleanup_database.pl --bg-jobs 1 -v --confirm 11 - Note that number of entries deleted is reported 12 - Attempt to clear other job types, including "all" eg perl misc/cronjobs/cleanup_database.pl --bg-jobs 1 --bg-type batch_item_record_deletion -v --confirm perl misc/cronjobs/cleanup_database.pl --bg-jobs 1 --bg-type all -v --confirm 13 - 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: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> |
||
---|---|---|
.. | ||
holds | ||
recalls | ||
rss | ||
social_data | ||
thirdparty | ||
advance_notices.pl | ||
archive_purchase_suggestions.pl | ||
automatic_checkin.pl | ||
automatic_item_modification_by_age.pl | ||
automatic_renewals.pl | ||
backup.sh | ||
batch_anonymise.pl | ||
build_browser_and_cloud.pl | ||
cart_to_shelf.pl | ||
check-url-quick.pl | ||
cleanup_database.pl | ||
cloud-kw.pl | ||
cloud-sample.conf | ||
CONFIGURE.gmail | ||
create_koc_db.pl | ||
crontab.example | ||
delete_items.pl | ||
delete_patrons.pl | ||
delete_records_via_leader.pl | ||
edi_cron.pl | ||
fines.pl | ||
gather_print_notices.pl | ||
import_webservice_batch.pl | ||
longoverdue.pl | ||
membership_expiry.pl | ||
merge_authorities.pl | ||
notice_unprocessed_suggestions.pl | ||
overdue_notices.pl | ||
patron_emailer.pl | ||
plugins_nightly.pl | ||
printoverdues.sh | ||
process_message_queue.pl | ||
purge_suggestions.pl | ||
reconcile_balances.pl | ||
remove_temporary_edifiles.pl | ||
runreport.pl | ||
serialsUpdate.pl | ||
share_usage_with_koha_community.pl | ||
sitemap.pl | ||
staticfines.pl | ||
stockrotation.pl | ||
update_patrons_category.pl | ||
update_totalissues.pl | ||
writeoff_debts.pl |