Changeset 25 for trunk/cleanup_gfac.php
- Timestamp:
- Jan 13, 2017, 1:30:29 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cleanup_gfac.php
r23 r25 159 159 //write_log( "$me: db=$db; requestID=$requestID; status=$status; cluster=$cluster" ); 160 160 161 if ( $cluster == 'bcf-local' || $cluster == 'alamo-local' ) 162 { 163 $clushost = $cluster; 164 $clushost = preg_replace( "/\-local/", "", $clushost ); 161 // if ( $cluster == 'bcf-local' || $cluster == 'alamo-local' ) 162 if ( preg_match( "/\-local/", $cluster ) || 163 preg_match( "/us3iab/", $cluster ) ) 164 { 165 // $clushost = $cluster; 166 // $clushost = preg_replace( "/\-local/", "", $clushost ); 167 $parts = explode( "-", $cluster ); 168 $clushost = $parts[ 0 ]; 165 169 get_local_files( $gfac_link, $clushost, $requestID, $id, $gfacID ); 166 } 170 write_log( "$me: clushost=$clushost reqID=$requestID get_local_files() gfacID=$gfacID" ); 171 } 172 else 173 write_log( "$me: NO get_local_files()" ); 167 174 168 175 $query = "SELECT id, stderr, stdout, tarfile FROM analysis " . … … 328 335 file_put_contents( $message_filename, $message_log, FILE_APPEND ); 329 336 // mysql_close( $gfac_link ); 330 //write_log( "$me: *messages.txt written" );337 write_log( "$me: *messages.txt written" ); 331 338 332 339 ///////// … … 346 353 return( -1 ); 347 354 } 348 //write_log( "$me: HPCAnalysisResult stderr,stdout updated" );349 355 350 356 // Save the tarfile and expand it … … 368 374 chdir( "$work/$gfacID" ); 369 375 370 $f = fopen( "analysis .tar", "w" );376 $f = fopen( "analysis-results.tar", "w" ); 371 377 fwrite( $f, $tarfile ); 372 378 fclose( $f ); 373 write_log( "$me: analysis.tar file written to work dir" );379 //write_log( "$me: analysis-results.tar file written to work dir" ); 374 380 375 381 $tar_out = array(); 376 exec( "tar -xf analysis .tar 2>&1", $tar_out, $err );382 exec( "tar -xf analysis-results.tar 2>&1", $tar_out, $err ); 377 383 378 384 if ( $err != 0 ) … … 461 467 "noiseGUID='$noiseGUID'," . 462 468 "modelGUID='$modelGUID'," . 463 "editedDataID= 1, " .469 "editedDataID=2, " . 464 470 "modelID=1, " . 465 471 "noiseType='$type'," . … … 670 676 mail_to_user( "success", "" ); 671 677 } 672 673 678 ?>
Note:
See TracChangeset
for help on using the changeset viewer.