move the "I need a transaction" marker into the called method, removing 2 perl round...
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 26 Oct 2010 15:31:17 +0000 (15:31 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 26 Oct 2010 15:31:17 +0000 (15:31 +0000)
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
Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm

index 95cb8c8..020999a 100644 (file)
@@ -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 );
 
index b520cbb..4a33ceb 100644 (file)
@@ -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 ";