[open-ils-commits] r12387 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Mar 3 16:47:50 EST 2009
Author: erickson
Date: 2009-03-03 16:47:46 -0500 (Tue, 03 Mar 2009)
New Revision: 12387
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/EventGroup.pm
Log:
pull last updated event from db for timestamp updates
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/EventGroup.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/EventGroup.pm 2009-03-03 20:25:36 UTC (rev 12386)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/EventGroup.pm 2009-03-03 21:47:46 UTC (rev 12387)
@@ -185,6 +185,7 @@
my @oks;
my $ok;
+ my $last_updated;
for my $event ( @{ $self->events } ) {
my $e = $self->editor->retrieve_action_trigger_event( $event->id );
$e->start_time( 'now' ) unless $e->start_time;
@@ -197,6 +198,7 @@
my $ok = $self->editor->update_action_trigger_event( $e );
if ($ok) {
push @oks, $ok;
+ $last_updated = $e->id;
}
}
@@ -207,13 +209,14 @@
$ok = $self->editor->xact_commit;
}
+ my $updated = $self->editor->retrieve_action_trigger_event($last_updated);
if ($ok) {
for my $event ( @{ $self->events } ) {
- my $updated = $self->editor->data;
- $event->start_time( $updated->start_time );
- $event->update_time( $updated->update_time );
- $event->update_process( $updated->update_process );
- $event->state( $updated->state );
+ my $e = $event->event;
+ $e->start_time( $updated->start_time );
+ $e->update_time( $updated->update_time );
+ $e->update_process( $updated->update_process );
+ $e->state( $updated->state );
}
}
More information about the open-ils-commits
mailing list