Changeset 25 for trunk/cleanup_gfac.php


Ignore:
Timestamp:
Jan 13, 2017, 1:30:29 PM (8 years ago)
Author:
gegorbet
Message:

merge us3iab/airavata gridctl code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/cleanup_gfac.php

    r23 r25  
    159159//write_log( "$me:     db=$db; requestID=$requestID; status=$status; cluster=$cluster" );
    160160
    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 ];
    165169      get_local_files( $gfac_link, $clushost, $requestID, $id, $gfacID );
    166    }
     170write_log( "$me:     clushost=$clushost  reqID=$requestID get_local_files() gfacID=$gfacID" );
     171   }
     172else
     173write_log( "$me:     NO get_local_files()" );
    167174
    168175   $query = "SELECT id, stderr, stdout, tarfile FROM analysis " .
     
    328335   file_put_contents( $message_filename, $message_log, FILE_APPEND );
    329336  // mysql_close( $gfac_link );
    330 //write_log( "$me: *messages.txt written" );
     337write_log( "$me: *messages.txt written" );
    331338
    332339   /////////
     
    346353      return( -1 );
    347354   }
    348 //write_log( "$me: HPCAnalysisResult stderr,stdout updated" );
    349355
    350356   // Save the tarfile and expand it
     
    368374   chdir( "$work/$gfacID" );
    369375
    370    $f = fopen( "analysis.tar", "w" );
     376   $f = fopen( "analysis-results.tar", "w" );
    371377   fwrite( $f, $tarfile );
    372378   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" );
    374380
    375381   $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 );
    377383
    378384   if ( $err != 0 )
     
    461467                  "noiseGUID='$noiseGUID'," .
    462468                  "modelGUID='$modelGUID'," .
    463                   "editedDataID=1, "        .
     469                  "editedDataID=2, "        .
    464470                  "modelID=1, "             .
    465471                  "noiseType='$type',"      .
     
    670676   mail_to_user( "success", "" );
    671677}
    672 
    673678?>
Note: See TracChangeset for help on using the changeset viewer.