[Koha-bugs] [Bug 29474] Automatic renewals cronjob is slow on systems with large numbers of reserves

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sat Nov 13 17:06:37 CET 2021


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

Joonas Kylmälä <joonas.kylmala at iki.fi> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |joonas.kylmala at iki.fi

--- Comment #2 from Joonas Kylmälä <joonas.kylmala at iki.fi> ---
If you remove the unless then you can delete the line

> return ( 0, "on_reserve" ) if $resfound && $cron;    # '' when no hold was found

Makes the code much simpler.

Please also move the cron return right after the call to 

> $auto_renew = _CanBookBeAutoRenewed({

so that now that the return value decision is not in an if-else condition at
the end the requirement for returning the values in a different order is clear
and the order won't be changed by some other developer accidentally. I think
adding a comment like "cron wants 'too_soon' over 'on_reserve'"

Please include stats too, but maybe you are at it, I noticed that this bug is
not even yet for sign-off and I'm here reviewing ;D

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


More information about the Koha-bugs mailing list