[open-ils-commits] r12304 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Feb 25 21:23:22 EST 2009
Author: erickson
Date: 2009-02-25 21:23:21 -0500 (Wed, 25 Feb 2009)
New Revision: 12304
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm
Log:
if no cleanup handler is defined for the given state, assume cleanedup is true
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm 2009-02-25 21:42:52 UTC (rev 12303)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm 2009-02-26 02:23:21 UTC (rev 12304)
@@ -99,12 +99,16 @@
$self->update_state( 'cleaning') || die 'Unable to update event state';
try {
my $cleanup = $self->reacted ? $self->event->event_def->cleanup_success : $self->event->event_def->cleanup_failure;
- $self->cleanedup(
- OpenILS::Application::Trigger::ModRunner::Cleanup
- ->new( $cleanup, $env)
- ->run
- ->final_result
- );
+ if($cleanup) {
+ $self->cleanedup(
+ OpenILS::Application::Trigger::ModRunner::Cleanup
+ ->new( $cleanup, $env)
+ ->run
+ ->final_result
+ );
+ } else {
+ $self->cleanedup(1);
+ }
} otherwise {
$log->error( shift() );
$self->update_state( 'error' ) || die 'Unable to update event state';
More information about the open-ils-commits
mailing list