From aaff7ab07f8d90c04bc56b9ff12a6fe373bc340d Mon Sep 17 00:00:00 2001 From: miker Date: Tue, 28 Sep 2010 20:45:17 +0000 Subject: [PATCH] move the early-out response so we avoid breaking the caller git-svn-id: svn://svn.open-ils.org/ILS/trunk@18091 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm b/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm index cfa31f83a0..4a80255376 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm @@ -672,15 +672,6 @@ 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; } @@ -697,6 +688,15 @@ sub run_all_events { 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"); -- 2.11.0