From: erickson Date: Mon, 12 Apr 2010 13:53:10 +0000 (+0000) Subject: move a couple of heavily hit calls from open-ils.storage to open-ils.cstore. removed... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=33406f6a81f5714706fe2b02f1ff1333ccaa9243;p=contrib%2FConifer.git 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) git-svn-id: svn://svn.open-ils.org/ILS/trunk@16200 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm b/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm index 4ab4bfde8c..b71f409ca8 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm @@ -1504,22 +1504,17 @@ __PACKAGE__->register_method( 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}); } diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Circ/CopyLocations.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ/CopyLocations.pm index 2952d2b9db..5cf22d8000 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Circ/CopyLocations.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ/CopyLocations.pm @@ -31,9 +31,9 @@ sub cl_retrieve_all { $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(