modifica x messaggio
This commit is contained in:
@@ -131,9 +131,6 @@ if ($sth->rows < 0) {
|
||||
$ToolName{$results->{'ToolNameID'}}{'ErroriTotaliLetture'} = "--";
|
||||
if ($results->{'ToolState'} eq "Active" ){
|
||||
$act_tool++;
|
||||
}
|
||||
if (substr($results->{'ToolNameID'},0,2) eq "GD" ){
|
||||
$act_tool++;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -150,7 +147,7 @@ my $stw = $dbh->prepare("select ToolNameID, EventDate, count(EventTime) 'Letture
|
||||
$stw->execute();
|
||||
|
||||
if ($stw->rows == 0) {
|
||||
print getLoggingTime() . " - No rows from RAWDATA.\n";
|
||||
print getLoggingTime() . " - No rows from RAWDATACOR.\n";
|
||||
$email_obj = "ATTENZIONE: nessuna lettura pervenuta!!!"
|
||||
} else {
|
||||
while (my $results = $stw->fetchrow_hashref) {
|
||||
@@ -158,17 +155,21 @@ if ($stw->rows == 0) {
|
||||
$ToolName{$results->{'ToolNameID'}}{'LettureCatene'} = $results->{'LettureCatene'};
|
||||
$ToolName{$results->{'ToolNameID'}}{'NumeroNodi'} = $results->{'NumeroNodi'};
|
||||
$ref_date = $results->{'EventDate'};
|
||||
if (substr($results->{'ToolNameID'},0,2) eq "GD" ){
|
||||
$gd_tool++;
|
||||
}
|
||||
}
|
||||
if (($act_tool + $gd_tool) == $stw->rows) {
|
||||
$email_obj = "Tutte le letture pervenute.";
|
||||
} else {
|
||||
$email_obj = "ATTENZIONE: alcune letture non pervenute!!!";
|
||||
}
|
||||
print getLoggingTime() . " - tool attivi: $act_tool - GD tool: $gd_tool - righe query: " . $stw->rows . ".\n";
|
||||
}
|
||||
|
||||
$stw->finish;
|
||||
|
||||
my $ste = $dbh->prepare("select ToolNameID, count(val0) 'ErroriTotaliLetture' from RAWDATA where EventDate = ? and val0 = 'Err1' group by ToolNameID")
|
||||
my $ste = $dbh->prepare("select ToolNameID, count(val0) 'ErroriTotaliLetture' from RAWDATACOR where EventDate = ? and val0 = 'Err1' group by ToolNameID")
|
||||
or die getLoggingTime() . " - $DBI::errstr";
|
||||
$ste->bind_param(1, $ref_date);
|
||||
$ste->execute();
|
||||
|
||||
Reference in New Issue
Block a user