[open-ils-commits] r18092 - branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application (miker)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Sep 28 16:46:05 EDT 2010


Author: miker
Date: 2010-09-28 16:45:59 -0400 (Tue, 28 Sep 2010)
New Revision: 18092

Modified:
   branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm
Log:
Backport r18091 from trunk: move the early-out response so we avoid breaking the caller

Modified: branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm
===================================================================
--- branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm	2010-09-28 20:45:17 UTC (rev 18091)
+++ branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm	2010-09-28 20:45:59 UTC (rev 18092)
@@ -672,16 +672,7 @@
 
         $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;
 }
 __PACKAGE__->register_method(
@@ -697,6 +688,15 @@
 
     my ($groups) = $self->method_lookup('open-ils.trigger.event.find_pending_by_group')->run($granularity);
 
+    # 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;
+        }
+    }
+
     for my $def ( keys %$groups ) {
         if ($def eq '*') {
             $logger->info("trigger: run_all_events firing un-grouped events");



More information about the open-ils-commits mailing list