Modified: trunk/opsview-core/lib/Opsview/Utils/NDOLogsImporter.pm
===================================================================
--- trunk/opsview-core/lib/Opsview/Utils/NDOLogsImporter.pm 2013-01-31 16:55:04 UTC (rev 11304)
+++ trunk/opsview-core/lib/Opsview/Utils/NDOLogsImporter.pm 2013-01-31 17:24:55 UTC (rev 11305)
@@ -1018,7 +1018,6 @@
if ( my $m = $HANDLERS[ $data->[$i] ] ) {
- # Test::More::diag "$event_type => $m()";
eval {
#$DB->txn( ping => sub {
#DBI->trace($ENV{DBI_TRACE2} || 0) unless $ENV{DBI_TRACE};
@@ -1029,7 +1028,6 @@
};
if ( my $e = $@ ) {
- # Test::More::diag "Died: $@\n" if $@;
$_[ ARG_SELF() ]->{logger}->fatal( "Error in $m: $e" );
}
}
@@ -1190,8 +1188,6 @@
}
);
- # $DB::single=1;
-
$sth->execute();
while ( my $row = $sth->fetchrow_arrayref ) {
add_cached_object_id(@$row);
@@ -1297,7 +1293,6 @@
die "Update failed: ", $sth_update_handle_NOTIFICATIONDATA->errstr, "\n"
unless $rv;
- # Test::More::diag "rv: $rv";
if ( $rv eq '0E0' ) {
$sth_insert_handle_NOTIFICATIONDATA->execute(@data);
@@ -1674,7 +1669,6 @@
die "Update failed: ", $sth_update_handle_COMMENTDATA->errstr, "\n"
unless $rv;
- # Test::More::diag "rv: $rv";
if ( $rv eq '0E0' ) {
$sth_insert_handle_COMMENTDATA->execute( @data, $state_time,
$state_time_usec, );
@@ -1688,7 +1682,6 @@
$sth_update_comments_handle_COMMENTDATA->errstr, "\n"
unless $rv;
- # Test::More::diag "rv: $rv";
if ( $rv eq '0E0' ) {
$sth_insert_comments_handle_COMMENTDATA->execute( @data,
$state_time, $state_time_usec, );
@@ -1706,8 +1699,6 @@
die "Update failed: ", $sth_delete_handle_COMMENTDATA->errstr, "\n"
unless $rv;
- # Test::More::diag "rv: $rv";
-
if ($is_current) {
my $rv =
@@ -1716,7 +1707,6 @@
$sth_delete_comments_handle_COMMENTDATA->errstr, "\n"
unless $rv;
- # Test::More::diag "rv: $rv";
}
}
@@ -1959,7 +1949,6 @@
die "Update failed: ", $sth_update_handle_DOWNTIMEDATA->errstr, "\n"
unless $rv;
- # Test::More::diag "rv: $rv";
if ( $rv eq '0E0' ) {
$sth_insert_handle_DOWNTIMEDATA->execute(@data);
}
@@ -1972,7 +1961,6 @@
$sth_update_schedule_handle_DOWNTIMEDATA->errstr, "\n"
unless $rv;
- # Test::More::diag "rv: $rv";
if ( $rv eq '0E0' ) {
$sth_insert_schedule_handle_DOWNTIMEDATA->execute(@data);
}
@@ -1990,8 +1978,6 @@
$sth_update_start_handle_DOWNTIMEDATA->errstr, "\n"
unless $rv;
- # Test::More::diag "rv: $rv";
-
if ($is_current) {
my $rv =
@@ -2001,7 +1987,6 @@
$sth_update_start_schedule_handle_DOWNTIMEDATA->errstr, "\n"
unless $rv;
- # Test::More::diag "rv: $rv";
}
}
@@ -2023,7 +2008,6 @@
$sth_update_stop_handle_DOWNTIMEDATA->errstr, "\n"
unless $rv;
- # Test::More::diag "rv: $rv";
}
if (
@@ -2045,7 +2029,6 @@
$sth_update_stop_schedule_handle_DOWNTIMEDATA->errstr, "\n"
unless $rv;
- # Test::More::diag "rv: $rv";
}
}
}
@@ -2165,7 +2148,6 @@
"\n"
unless $rv;
- # Test::More::diag "rv: $rv";
if ( $rv eq '0E0' ) {
$sth_insert_handle_PROGRAMSTATUSDATA->execute(@data);
}
@@ -2480,7 +2462,6 @@
"\n"
unless $rv;
- # Test::More::diag "rv: $rv";
if ( $rv eq '0E0' ) {
$sth_insert_handle_HOSTSTATUSDATA->execute( @data, $object_id );
}
@@ -2494,7 +2475,6 @@
$sth_update_downtime_handle_HOSTSTATUSDATA->errstr, "\n"
unless $rv;
- # Test::More::diag "rv: $rv";
if ( $rv eq '0E0' ) {
$sth_insert_downtime_handle_HOSTSTATUSDATA->execute( @data,
$event->[ NDO_DATA_SCHEDULEDDOWNTIMEDEPTH() ], $object_id );
@@ -2830,7 +2810,6 @@
$sth_update_handle_SERVICESTATUSDATA->errstr, "\n"
unless $rv;
- # Test::More::diag "rv: $rv";
if ( $rv eq '0E0' ) {
$sth_insert_handle_SERVICESTATUSDATA->execute( @data,
$object_id );
@@ -2845,7 +2824,6 @@
$sth_update_downtime_handle_SERVICESTATUSDATA->errstr, "\n"
unless $rv;
- # Test::More::diag "rv: $rv";
if ( $rv eq '0E0' ) {
$sth_insert_downtime_handle_SERVICESTATUSDATA->execute( @data,
$event->[ NDO_DATA_SCHEDULEDDOWNTIMEDEPTH() ], $object_id );
@@ -2894,7 +2872,6 @@
my $rv = $sth_exists->execute( $_[ ARG_OBJECT_ID() ], $member_id );
die "Select failed: ", $sth_exists->errstr, "\n" unless $rv;
- # Test::More::diag "rv: $rv";
my ($exists) = $sth_exists->fetchrow_array();
$sth_exists->finish();
@@ -2902,7 +2879,6 @@
my $rv = $sth_insert->execute( $_[ ARG_OBJECT_ID() ], $member_id );
die "Insert failed: ", $sth_insert->errstr, "\n" unless $rv;
- # Test::More::diag "rv: $rv";
}
}
}
@@ -2940,7 +2916,6 @@
my $rv = $sth_exists->execute( $_[ ARG_OBJECT_ID3() ], $member_id );
die "Select failed: ", $sth_exists->errstr, "\n" unless $rv;
- # Test::More::diag "rv: $rv";
my ($exists) = $sth_exists->fetchrow_array();
$sth_exists->finish();
@@ -2948,7 +2923,6 @@
my $rv = $sth_insert->execute( $_[ ARG_OBJECT_ID3() ], $member_id );
die "Insert failed: ", $sth_insert->errstr, "\n" unless $rv;
- # Test::More::diag "rv: $rv";
}
}
}
@@ -2987,7 +2961,6 @@
my $rv = $sth_exists->execute( $_[ ARG_OBJECT_ID3() ], $member_id );
die "Select failed: ", $sth_exists->errstr, "\n" unless $rv;
- # Test::More::diag "rv: $rv";
my ($exists) = $sth_exists->fetchrow_array();
$sth_exists->finish();
@@ -2995,7 +2968,6 @@
my $rv = $sth_insert->execute( $_[ ARG_OBJECT_ID3() ], $member_id );
die "Insert failed: ", $sth_insert->errstr, "\n" unless $rv;
- # Test::More::diag "rv: $rv";
}
}
}
@@ -3039,7 +3011,6 @@
die "Select failed: ", $sth_exists_handle_MULTI_PARENTHOST->errstr, "\n"
unless $rv;
- # Test::More::diag "rv: $rv";
my ($exists) = $sth_exists_handle_MULTI_PARENTHOST->fetchrow_array();
$sth_exists_handle_MULTI_PARENTHOST->finish();
@@ -3051,7 +3022,6 @@
"\n"
unless $rv;
- # Test::More::diag "rv: $rv";
}
}
}
@@ -3258,7 +3228,6 @@
"\n"
unless $rv;
- # Test::More::diag "rv: $rv";
if ( $rv eq '0E0' ) {
$sth_insert_handle_CONTACTSTATUSDATA->execute(@data);
}
@@ -3350,7 +3319,6 @@
"\n"
unless $rv;
- # Test::More::diag "rv: $rv";
}
}
@@ -3487,7 +3455,6 @@
die "Insert failed: ", $sth_insert_handle_STATECHANGEDATA->errstr, "\n"
unless $rv;
- # Test::More::diag "rv: $rv";
}
}
@@ -3557,8 +3524,6 @@
die "Insert failed: ", $sth_insert_handle_PROCESSDATA->errstr, "\n"
unless $rv;
- # Test::More::diag "rv: $rv";
-
my $is_current = $state_time >= $LATEST_REALTIME_DATA_TIME;
if ( $type == NEBTYPE_PROCESS_PRELAUNCH() && $is_current ) {
@@ -3876,15 +3841,12 @@
die "Update failed: ", $sth_update_handle_HOSTDEFINITION->errstr, "\n"
unless $rv;
- # Test::More::diag "rv: $rv";
if ( $rv eq '0E0' ) {
my $rv = $sth_insert_handle_HOSTDEFINITION->execute(@data);
die "Insert failed: ", $sth_insert_handle_HOSTDEFINITION->errstr,
"\n"
unless $rv;
- # Test::More::diag "rv: $rv";
-
$host_id = $sth_insert_handle_HOSTDEFINITION->{mysql_insertid};
}
@@ -4147,15 +4109,12 @@
"\n"
unless $rv;
- # Test::More::diag "rv: $rv";
if ( $rv eq '0E0' ) {
my $rv = $sth_insert_handle_SERVICEDEFINITION->execute(@data);
die "Insert failed: ",
$sth_insert_handle_SERVICEDEFINITION->errstr, "\n"
unless $rv;
- # Test::More::diag "rv: $rv";
-
$service_id =
$sth_insert_handle_SERVICEDEFINITION->{mysql_insertid};
}
@@ -4270,7 +4229,6 @@
$sth_update_handle_SERVICEDEPENDENCYDEFINITION->errstr, "\n"
unless $rv;
- # Test::More::diag "rv: $rv";
if ( $rv eq '0E0' ) {
my $rv =
$sth_insert_handle_SERVICEDEPENDENCYDEFINITION->execute(@data);
@@ -4278,7 +4236,6 @@
$sth_insert_handle_SERVICEDEPENDENCYDEFINITION->errstr, "\n"
unless $rv;
- # Test::More::diag "rv: $rv";
}
}
}
@@ -4337,14 +4294,12 @@
"\n"
unless $rv;
- # Test::More::diag "rv: $rv";
if ( $rv eq '0E0' ) {
my $rv = $sth_insert_handle_COMMANDDEFINITION->execute(@data);
die "Insert failed: ",
$sth_insert_handle_COMMANDDEFINITION->errstr, "\n"
unless $rv;
- # Test::More::diag "rv: $rv";
}
}
}
@@ -4405,15 +4360,12 @@
"\n"
unless $rv;
- # Test::More::diag "rv: $rv";
if ( $rv eq '0E0' ) {
my $rv = $sth_insert_handle_TIMEPERIODDEFINITION->execute(@data);
die "Insert failed: ",
$sth_insert_handle_TIMEPERIODDEFINITION->errstr, "\n"
unless $rv;
- # Test::More::diag "rv: $rv";
-
$timeperiod_id =
$sth_insert_handle_TIMEPERIODDEFINITION->{mysql_insertid};
}
@@ -4556,15 +4508,12 @@
"\n"
unless $rv;
- # Test::More::diag "rv: $rv";
if ( $rv eq '0E0' ) {
my $rv = $sth_insert_handle_CONTACTDEFINITION->execute(@data);
die "Insert failed: ",
$sth_insert_handle_CONTACTDEFINITION->errstr, "\n"
unless $rv;
- # Test::More::diag "rv: $rv";
-
$contact_id =
$sth_insert_handle_CONTACTDEFINITION->{mysql_insertid};
}
@@ -4829,7 +4778,6 @@
);
my $rv = $sth_insert->execute( @data );
die "Update failed: ", $sth_insert->errstr, "\n" unless $rv;
- Test::More::diag "rv: $rv";
}
}
@@ -4894,7 +4842,6 @@
my $rv = $sth_update->execute( @data );
die "Update failed: ", $sth_update->errstr, "\n" unless $rv;
- # Test::More::diag "rv: $rv";
if ( $rv eq '0E0' ) {
$sth_insert->execute( @data );
}
@@ -4962,7 +4909,6 @@
my $rv = $sth_update->execute( @data );
die "Update failed: ", $sth_update->errstr, "\n" unless $rv;
- # Test::More::diag "rv: $rv";
if ( $rv eq '0E0' ) {
$sth_insert->execute( @data );