From c4fbafbbcc49ec811bcffe1fb13b1ae4a628ef6c Mon Sep 17 00:00:00 2001 From: battilo Date: Fri, 13 Oct 2017 18:43:20 +0200 Subject: [PATCH] tolto update temp gd --- LoadCSVData.pl | 40 +++------------------------------------- 1 file changed, 3 insertions(+), 37 deletions(-) diff --git a/LoadCSVData.pl b/LoadCSVData.pl index 95d75b3..1fbbd77 100644 --- a/LoadCSVData.pl +++ b/LoadCSVData.pl @@ -454,49 +454,15 @@ while ( my $line = ) { close FILE; $sql[ ( $outcount % $maxsqllines ) - 1 ] =~ s/,$/;/g; writeOutSql($tool); -if ( $tooltype eq "GD-disattivato" ) { - my ( $Vbat, $Tmod ) = split( /;/, $CSVData[0] ); - my ( $TName, $STime, $ETime ) = split( /;/, $CSVData[1] ); - my $dbh = - DBI->connect( "DBI:mysql:$db_lar;host=$server", $username, $password ) - or die getTimeStamp("log") - . " - pid $$ >> Could not connect to database: $DBI::errstr"; - - my $sth = - $dbh->prepare( "UPDATE RAWDATACOR " - . "SET BatLevel = '" - . $Vbat - . "', Temperature = '" - . $Tmod - . "' WHERE UnitName = '" - . $unit - . "' and ToolNameID = '" - . $TName - . "' and EventDate = '" - . $GDEventDate - . "' and EventTime between '" - . $STime - . "' and '" - . $ETime - . "';" ) - or die getTimeStamp("log") . " - pid $$ >> $DBI::errstr "; - - $sth->execute(); - $sth->finish; - - # Disconnect - $dbh->disconnect; - -#update DT corrispondente con stessa parte numerica ToolNameID, EventDate, EventTime e UnitName +if ( $tooltype eq "GD" ) { + print getTimeStamp("log") . " - pid $$ >> tool GD: nothing to do.\n"; } else { -#update DT se esiste GD corrispondente con stesso ToolNameID, EventDate, EventTime matlabCalc(); if ($ftp_send) { - if ( $tool = 'DT0076' ) { + if ( $tool eq 'DT0076' ) { sleep(600); } - trxelab(); } }