From: senator Date: Tue, 28 Sep 2010 20:26:09 +0000 (+0000) Subject: A/T: Send an early response back to the client when running all pending events X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=b57f38308655fdb30075cc52ebaab6d430fe2bc5;p=evergreen%2Ftadl.git A/T: Send an early response back to the client when running all pending events The client may wish to know when the relativelty fast process of creating the events is over, and the relatively slow process of validating them and running their reactors/cleanup/etc is about to begin. git-svn-id: svn://svn.open-ils.org/ILS/trunk@18089 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm b/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm index 8b8e982149..cfa31f83a0 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm @@ -672,6 +672,15 @@ sub grouped_events { $e->editor->disconnect; } + # Could report on how the "found" events were grouped, but who's going to + # consume that information? + for my $key (keys %groups) { + if (@{ $groups{$key} }) { + $client->respond({"status" => "found"}); + last; + } + } + return \%groups; }