LP#1615025 TPAC large circ history sort repair
authorBill Erickson <berickxx@gmail.com>
Fri, 19 Aug 2016 15:41:14 +0000 (11:41 -0400)
committerMike Rylander <mrylander@gmail.com>
Fri, 19 Aug 2016 17:30:31 +0000 (13:30 -0400)
Fix TPAC circ history retrieval code thinko so that history rows are
retrieved one at a time instead of in a batch (.atomic) to avoid
overwhelming Ejabberd.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm

index 945c9f2..1219b70 100644 (file)
@@ -1623,15 +1623,17 @@ sub fetch_user_circ_history {
     );
 
     $e->xact_begin;
-    my $circs = $e->search_action_user_circ_history([
-        {usr => $e->requestor->id},
-        {   # order newest to oldest by default
-            order_by => {auch => 'xact_start DESC'},
-            $flesh ? %flesh_ops : (),
-            %limits
-        },
+    my $circs = $e->search_action_user_circ_history(
+        [
+            {usr => $e->requestor->id},
+            {   # order newest to oldest by default
+                order_by => {auch => 'xact_start DESC'},
+                $flesh ? %flesh_ops : (),
+                %limits
+            }
+        ],
         {substream => 1}
-    ]);
+    );
     $e->rollback;
 
     return $circs unless $flesh;