From 7d1590dcb51a21b8f4f25ffcd570fe04cdc3c272 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Tue, 26 Feb 2013 14:33:58 -0500 Subject: [PATCH] Repair clear holds shelf transaction timeout Initiate our cstore transaction after making the initial, potentially long-running call to collect the clear-shelf holds to process. Otherwise, the cstore transaction may time out while waiting on the holds retrieval to complete. Signed-off-by: Bill Erickson Signed-off-by: Ben Shum --- Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 4a079bd2d3..e98b88ebd3 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm @@ -3456,7 +3456,7 @@ __PACKAGE__->register_method( sub clear_shelf_process { my($self, $client, $auth, $org_id, $match_copy) = @_; - my $e = new_editor(authtoken=>$auth, xact => 1); + my $e = new_editor(authtoken=>$auth); $e->checkauth or return $e->die_event; my $cache = OpenSRF::Utils::Cache->new('global'); @@ -3469,6 +3469,8 @@ sub clear_shelf_process { "open-ils.circ.captured_holds.id_list.expired_on_shelf.retrieve" )->run($auth, $org_id, $match_copy); + $e->xact_begin; + my @holds; my @canceled_holds; # newly canceled holds my $chunk_size = 25; # chunked status updates -- 2.11.0