From: Bill Erickson Date: Thu, 22 Aug 2013 20:47:27 +0000 (-0400) Subject: Action/Trigger load environment via stream X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=de255eae610a76ce92d94b3b9785d407a8da9872;p=evergreen%2Fpines.git 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 --- 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; }