$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');