my $e = OpenILS::Application::Trigger::Event->new($event_id);
if ($e->validate->valid) {
+ $logger->info("Event is valid, reacting...");
$e->react->cleanup;
}
my $e = OpenILS::Application::Trigger::EventGroup->new(@$events);
if ($e->validate->valid) {
+ $logger->info("Event group is valid, reacting...");
$e->react->cleanup;
}
use strict; use warnings;
use OpenSRF::EX qw/:try/;
-use OpenSRF::Utils::Logger qw/:logger/;
+use OpenSRF::Utils::Logger qw/$logger/;
use OpenILS::Utils::Fieldmapper;
use OpenILS::Utils::CStoreEditor q/:funcs/;
$self->cleanedup(1);
}
} otherwise {
- $log->error( shift() );
+ $log->error("Event cleanup failed with ". shift() );
$self->update_state( 'error' ) || die 'Unable to update event state';
};
->final_result
);
} otherwise {
- $log->error( shift() );
+ $log->error("Event reacting failed with ". shift() );
$self->update_state( 'error' ) || die 'Unable to update event state';
};
->final_result
);
} otherwise {
- $log->error( shift() );
+ $log->error("Event validation failed with ". shift() );
$self->update_state( 'error' ) || die 'Unable to update event state';
};
use base 'OpenILS::Application::Trigger::Event';
use OpenSRF::EX qw/:try/;
-use OpenSRF::Utils::Logger qw/:level/;
+use OpenSRF::Utils::Logger qw/$logger/;
use OpenILS::Utils::Fieldmapper;
use OpenILS::Utils::CStoreEditor q/:funcs/;
->final_result
);
} otherwise {
- $log->error( shift() );
+ $log->error("Event reacting failed with ". shift() );
$self->update_state( 'error' ) || die 'Unable to update event group state';
};
$self->{ids} = [ map { $_->id } @valid_events ];
$self->editor->xact_commit;
} otherwise {
- $log->error( shift() );
+ $log->error("Event group validation failed with ". shift() );
$self->editor->xact_rollback;
$self->update_state( 'error' ) || die 'Unable to update event group state';
};