From 83df5aae2cb9e06828d815661a9dd30e4f0ded70 Mon Sep 17 00:00:00 2001 From: miker Date: Tue, 26 Oct 2010 15:31:17 +0000 Subject: [PATCH] move the "I need a transaction" marker into the called method, removing 2 perl round-trips to start the transaction and close it git-svn-id: svn://svn.open-ils.org/ILS/trunk@18475 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm | 2 +- Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm index 95cb8c8a1..020999a33 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm @@ -2457,7 +2457,7 @@ sub find_nearest_permitted_hold { my $fifo = $U->ou_ancestor_setting_value($user->ws_ou, 'circ.holds_fifo'); # search for what should be the best holds for this copy to fulfill - my $best_holds = $U->storagereq_xact( + my $best_holds = $U->storagereq( "open-ils.storage.action.hold_request.nearest_hold.atomic", $user->ws_ou, $copy->id, 10, $hold_stall_interval, $fifo ); diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm index b520cbb6a..4a33ceb1c 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm @@ -285,6 +285,8 @@ sub nearest_hold { my $age = shift() || '0 seconds'; my $fifo = shift(); + local $OpenILS::Application::Storage::WRITE = 1; + my $holdsort = isTrue($fifo) ? "pgt.hold_priority, CASE WHEN h.cut_in_line IS TRUE THEN 0 ELSE 1 END, h.request_time, h.selection_depth DESC, p.prox " : "p.prox, pgt.hold_priority, CASE WHEN h.cut_in_line IS TRUE THEN 0 ELSE 1 END, h.selection_depth DESC, h.request_time "; -- 2.11.0