From 941c1e5c832d1f7792852e3ccc39760fd1912dd9 Mon Sep 17 00:00:00 2001 From: erickson Date: Fri, 12 Dec 2008 16:40:50 +0000 Subject: [PATCH] make ranged pgpt retrieval streaming git-svn-id: svn://svn.open-ils.org/ILS/trunk@11536 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Actor.pm | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm b/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm index 973b8be669..ef2f8e31ee 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm @@ -2761,19 +2761,22 @@ sub apply_penalty { __PACKAGE__->register_method( - method => "ranged_penalty_thresholds", - api_name => "open-ils.actor.grp_penalty_threshold.ranged.retrieve"); + method => "ranged_penalty_thresholds", + api_name => "open-ils.actor.grp_penalty_threshold.ranged.retrieve", + stream => 1 +); sub ranged_penalty_thresholds { my($self, $conn, $auth, $context_org) = @_; my $e = new_editor(authtoken=>$auth); return $e->event unless $e->checkauth; return $e->event unless $e->allowed('VIEW_GROUP_PENALTY_THRESHOLD', $context_org); - my $list = $e->search_permission_grp_penalty_threshold( - {org_unit => $U->get_org_ancestors($context_org)} - ); - - return $list; + my $list = $e->search_permission_grp_penalty_threshold([ + {org_unit => $U->get_org_ancestors($context_org)}, + {order_by => {pgpt => 'id'}} + ]); + $conn->respond($_) for @$list; + return undef; } -- 2.11.0