Changeset 26 for trunk/cleanup.php


Ignore:
Timestamp:
Jan 19, 2017, 12:01:07 PM (8 years ago)
Author:
gegorbet
Message:

various minor fixes/mods to gridctl

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/cleanup.php

    r25 r26  
    195195   $fn_tarfile = "analysis-results.tar";
    196196   $num_try    = 0;
    197 $len1 = strlen( $fn_tarfile );
    198 write_log( "$me: fn_tarfile=$fn_tarfile  len(tar)=$len1" );
     197write_log( "$me: fn_tarfile=$fn_tarfile" );
    199198   while ( ! file_exists( $fn_tarfile ) && $num_try < 3 )
    200199   {
     
    218217else                          write_log( "$me: NOT FOUND: $fn_tarfile" );
    219218
     219   $stderr   = '';
     220   $stdout   = '';
     221   $tarfile  = '';
    220222   if ( file_exists( $fn_stderr  ) ) $stderr   = file_get_contents( $fn_stderr  );
    221223   if ( file_exists( $fn_stdout  ) ) $stdout   = file_get_contents( $fn_stdout  );
    222224   if ( file_exists( $fn_tarfile ) ) $tarfile  = file_get_contents( $fn_tarfile );
     225   // If stdout,stderr have no content, retry after delay
     226   if ( strlen( $stdout ) == 0  ||  strlen( $stderr ) == 0 )
     227   {
     228      sleep( 20 );
     229      if ( file_exists( $fn_stderr  ) )
     230         $stderr   = file_get_contents( $fn_stderr  );
     231      if ( file_exists( $fn_stdout  ) )
     232         $stdout   = file_get_contents( $fn_stdout  );
     233   }
     234
     235write_log( "$me:  length contents stderr,stdout,tarfile -- "
     236 . strlen($stderr) . "," . strlen($stdout) . "," . strlen($tarfile) );
    223237
    224238   if ( $cluster == 'alamo'  || $cluster == 'alamo-local' )
Note: See TracChangeset for help on using the changeset viewer.