From de255eae610a76ce92d94b3b9785d407a8da9872 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Thu, 22 Aug 2013 16:47:27 -0400 Subject: [PATCH] Action/Trigger load environment via stream Load objects in the A/T environment via streaming response instead of atomic, to avoid very large messages. Signed-off-by: Bill Erickson Signed-off-by: Chris Sharp --- .../src/perlmods/lib/OpenILS/Application/Trigger/Event.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Event.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Event.pm index b0be015186..e8d2f7eaa6 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Event.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Event.pm @@ -573,12 +573,15 @@ sub _object_by_path { my $def_id = $self->event->event_def->id; my $str_path = join('.', @$path); + my @params = (($multi) ? { $ffield => $lval } : $lval); + @params = ([@params], {substream => 1}) if $meth =~ /^search/; + $obj = $_object_by_path_cache{$def_id}{$str_path}{$fhint}{$step}{$ffield}{$lval} || ( (grep /cstore/, @{ OpenILS::Application->publish_fieldmapper->{$fclass}{controller} }) ? $ed : ($red ||= new_rstore_editor(xact=>1)) - )->$meth( ($multi) ? { $ffield => $lval } : $lval); + )->$meth(@params); $_object_by_path_cache{$def_id}{$str_path}{$fhint}{$step}{$ffield}{$lval} ||= $obj; } -- 2.43.2