Koha/misc
Nick Clemens 8ef9ac5445
Bug 37552: Wrap auto renewal attempt in eval to ensure script does not die
When libraries have a lot of checkouts, or an AMH, checkins can happen while the cron is running.

This patch simply adds an eval around the auto renewal attempt in case of early check in or other errors.

You can verify cron completed by enabling cronjob log in system preferences and checking the action logs

To test:
1 - Add 'sleep(10);' to automatic_renewals.pl
2 - Set circulation rules to enable automatic renewals
3 - Issue an item to a patron
4 - perl misc/cronjobs/automatic_renewals.pl -v
5 - Confirm item would not be renewed
6 - perl misc/cronjobs/automatic_renewals.pl -v -c
7 - Quickly check in the item
8 - The cronjob dies
    DBIx::Class::Row::update(): Can't update Koha::Schema::Result::Issue=HASH(0x586e1a674fb0): row not found at /kohadevbox/koha/Koha/Object.pm line 172
9 - Apply patch
10 - Checkout the item again
11 - perl misc/cronjobs/automatic_renewals.pl -v -c
12 - Quickly checkin the item
13 - You get a warning, but the cron completes

Signed-off-by: CJ Lynce <cj.lynce@westlakelibrary.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-08-16 17:33:49 +02:00
..
admin
bin Bug 37543: (follow-up) Tidy 2024-08-16 17:33:43 +02:00
cronjobs Bug 37552: Wrap auto renewal attempt in eval to ensure script does not die 2024-08-16 17:33:49 +02:00
devel Bug 36309: Make create_superlibrarian.pl output more useful 2024-04-22 08:57:35 +02:00
interface_customization
maintenance Bug 37181: Add --confirm option to pseudonymize_statistics.pl 2024-06-27 14:04:54 +02:00
migration_tools Bug 37553: Tidy to make QA tools happy 2024-08-02 18:59:59 +02:00
release_notes 24.05.00: Add release notes 2024-05-27 18:26:45 +02:00
search_tools Bug 35345: Add --where option to rebuild_elasticsearch.pl 2024-04-22 12:39:26 +02:00
translator Bug 37303: Replace po2json with a JS version 2024-07-26 14:49:53 +01:00
workers Bug 36901: Add logging for uncaught exceptions in background job classes 2024-07-01 18:55:54 +02:00
add_date_fields_to_marc_records.pl
add_statistics_borrowers_categorycode.pl Bug 34478: op =~ ^cud- in pl/pm 2024-03-01 10:56:11 +01:00
batchCompareMARCvsFrameworks.pl
batchdeletebiblios.pl
batchDeleteUnusedSubfields.pl
batchImportMARCWithBiblionumbers.pl
batchRebuildBiblioTables.pl
batchRebuildItemsTables.pl
batchRepairMissingBiblionumbers.pl
check_sysprefs.pl
commit_file.pl
export_borrowers.pl
export_records.pl Bug 36770: (QA follow-up) Tidy export_records.pl 2024-08-09 18:44:54 +02:00
exportauth.pl
import_patrons.pl Bug 34621: Tidy import_patrons.pl 2024-04-12 14:02:43 +02:00
koha-install-log
link_bibs_to_authorities.pl Bug 30024: Make link_bibs_to_authorities.pl rely on LinkerRelink 2023-11-03 14:22:45 -03:00
load_yaml.pl
mod_zebraqueue.pl
process_ill_updates.pl Bug 35581: Koha::Illrequest -> Koha::ILL::Request 2024-04-22 08:57:45 +02:00
recreateIssueStatistics.pl Bug 34478: op =~ ^cud- in pl/pm - Manual revert changes to recreateIssueStatistics.pl 2024-03-01 10:57:15 +01:00
sax_parser_print.pl
sax_parser_test.pl
sip_cli_emulator.pl Bug 34478: op =~ ^cud- in pl/pm - Manual revert changes to sip_cli_emulator.pl 2024-03-01 10:57:14 +01:00
stage_file.pl
z3950_responder.pl