A/T: Send an early response back to the client when running all pending events
authorsenator <senator@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 28 Sep 2010 20:26:09 +0000 (20:26 +0000)
committersenator <senator@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 28 Sep 2010 20:26:09 +0000 (20:26 +0000)
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

Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm

index 8b8e982..cfa31f8 100644 (file)
@@ -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;
 }