From: Bill Erickson Date: Mon, 26 Mar 2018 17:24:44 +0000 (-0400) Subject: Hold shelf expire cstore keepalive X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=d7a28fb4f2af4151c21df62582c26dd08dc6916b;p=working%2FEvergreen.git Hold shelf expire cstore keepalive Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm index 9eb82676c6..4fbd48cde7 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm @@ -1142,6 +1142,18 @@ sub set_hold_shelf_expire_time { $expire_time = $dt_parser->parse_datetime(clean_ISO8601($dateinfo->{end})); } $interval_counter++; + + # KCLS + # IF we're in this loop too long, our cstore transaction can + # time out. Periodically tell cstore we're still here by + # fetching a tiny org unit object. This is obviously a hack. + # TODO: speed up the logic of this function overall. + # NOTE: we are not using the faster stock version of this + # function because we need every day within the shelf + # expire interval to be an open day for the pickup lib. + if ($interval_counter % 10 == 0 && $editor) { + $editor->retrieve_actor_org_unit(1); + } } $expire_time->set(hour => '23', minute => '59', second => '59');