IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 36924


Ignore:
Timestamp:
Jun 20, 2014, 2:46:26 PM (12 years ago)
Author:
watersc1
Message:

Change to randomize which thread gets which file. This should equalize things.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippScripts/scripts/sc_transfer_tool.pl

    r36844 r36924  
    5151while(<I>) {
    5252    chomp;
     53    $i = int(rand($#filehandles));
     54
    5355    my $fline;
    5456    if ($fetch) {
     
    5759    if (($fetch)&&(!(-e $_))) {  # We are fetching, and do not already have this file.
    5860        print { $filehandles[$i] } $fline;
    59         $i++;
     61#       $i++;
    6062    }
    6163    elsif (!($fetch)) { # We are pushing
    6264#       if (-e "${local_tmp}/$_") {
    6365            print { $filehandles[$i] } "${local_tmp}/$_" . "\n";
    64             $i++;
     66#           $i++;
    6567#       }
    6668#       else { # But somehow couldn't find the file we expected
     
    6971#       }
    7072    }
    71     if ($i >= $threads) { $i = 0; }
     73#    if ($i >= $threads) { $i = 0; }
    7274}
    7375close(I);
Note: See TracChangeset for help on using the changeset viewer.