move a couple of heavily hit calls from open-ils.storage to open-ils.cstore. removed...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 12 Apr 2010 13:53:10 +0000 (13:53 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 12 Apr 2010 13:53:10 +0000 (13:53 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@16200 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Actor.pm
Open-ILS/src/perlmods/OpenILS/Application/Circ/CopyLocations.pm

index 4ab4bfd..b71f409 100644 (file)
@@ -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});
 }
 
 
index 2952d2b..5cf22d8 100644 (file)
@@ -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(