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

Emily Lamancusa <[email protected]> changed:

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

--- Comment #4 from Emily Lamancusa <[email protected]> ---
Created attachment 170320
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=170320&action=edit
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 <[email protected]>
Signed-off-by: Emily Lamancusa <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to