[open-ils-commits] r16200 - in trunk/Open-ILS/src/perlmods/OpenILS/Application: . Circ (erickson)

svn at svn.open-ils.org svn at svn.open-ils.org
Mon Apr 12 09:53:12 EDT 2010


Author: erickson
Date: 2010-04-12 09:53:10 -0400 (Mon, 12 Apr 2010)
New Revision: 16200

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/CopyLocations.pm
Log:
move a couple of heavily hit calls from open-ils.storage to open-ils.cstore.  removed now-unnecessary xact begin/rollback (handled w/ authoritative via CStoreEditor)

Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm	2010-04-12 13:07:56 UTC (rev 16199)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm	2010-04-12 13:53:10 UTC (rev 16200)
@@ -1504,22 +1504,17 @@
 
 sub user_fines_summary {
 	my( $self, $client, $auth, $user_id ) = @_;
+
 	my $e = new_editor(authtoken=>$auth);
 	return $e->event unless $e->checkauth;
-	my $user = $e->retrieve_actor_user($user_id)
-		or return $e->event;
 
 	if( $user_id ne $e->requestor->id ) {
+	    my $user = $e->retrieve_actor_user($user_id) or return $e->event;
 		return $e->event unless 
 			$e->allowed('VIEW_USER_FINES_SUMMARY', $user->home_ou);
 	}
-	
-	# run this inside a transaction to prevent replication delay errors
-	my $ses = $U->start_db_session();
-	my $s = $ses->request(
-		'open-ils.storage.money.open_user_summary.search', $user_id )->gather(1);
-	$U->rollback_db_session($ses);
-	return $s;
+
+    return $e->search_money_open_user_summary({usr => $user_id});
 }
 
 

Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/CopyLocations.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/CopyLocations.pm	2010-04-12 13:07:56 UTC (rev 16199)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/CopyLocations.pm	2010-04-12 13:53:10 UTC (rev 16200)
@@ -31,9 +31,9 @@
 		$orgId = $otree->id;
 	}
 
-	$logger->debug("Fetching ranged copy location set for org $orgId");
-	return $U->storagereq(
-		'open-ils.storage.ranged.asset.copy_location.retrieve.atomic', $orgId);
+    return new_editor()->search_asset_copy_location({
+        owning_lib => $U->get_org_full_path($org_id);
+    });
 }
 
 __PACKAGE__->register_method(



More information about the open-ils-commits mailing list