[open-ils-commits] r18475 - in trunk/Open-ILS/src/perlmods/OpenILS/Application: Circ Storage/Publisher (miker)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Oct 26 11:31:19 EDT 2010


Author: miker
Date: 2010-10-26 11:31:17 -0400 (Tue, 26 Oct 2010)
New Revision: 18475

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm
Log:
move the "I need a transaction" marker into the called method, removing 2 perl round-trips to start the transaction and close it

Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm	2010-10-26 14:52:25 UTC (rev 18474)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm	2010-10-26 15:31:17 UTC (rev 18475)
@@ -2457,7 +2457,7 @@
 	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 );
 

Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm	2010-10-26 14:52:25 UTC (rev 18474)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm	2010-10-26 15:31:17 UTC (rev 18475)
@@ -285,6 +285,8 @@
 	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 ";



More information about the open-ils-commits mailing list