From d7a28fb4f2af4151c21df62582c26dd08dc6916b Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Mon, 26 Mar 2018 13:24:44 -0400 Subject: [PATCH] Hold shelf expire cstore keepalive Signed-off-by: Bill Erickson --- Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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'); -- 2.11.0