IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 37286


Ignore:
Timestamp:
Aug 21, 2014, 8:15:25 PM (12 years ago)
Author:
eugene
Message:

transfer back needs to record the files that actually exist

Location:
tags/ipp-pv3-20140717/ippScripts/scripts
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • tags/ipp-pv3-20140717/ippScripts/scripts/sc_transfer_tool.pl

    r37271 r37286  
    8888}
    8989
     90open (STATFILE, ">${local_tmp}/${input_base}.stat");
     91
    9092$i = 0;
    9193while(<I>) {
     
    112114        if ($quickfetch && (-e $_)) { next; }
    113115        print { $filehandles[$i] } $fline;
    114     }
    115     elsif (!($fetch)) { # We are pushing
    116         # The rsync call expects to find files of a given name in the directory specified.
    117 #       print { $filehandles[$i] } "${local_tmp}/$_" . "\n";
    118 #       if (-e "${local_tmp}/$_") {
    119         print { $filehandles[$i] } "$_" . "\n";
    120         # }
    121         # else {
    122         #     print "missing $_\n";
    123         # }
     116    } else {
     117        # We are pushing, but only send back files we actually have
     118        if (-e "$_") {
     119            print { $filehandles[$i] } "$_" . "\n";
     120            print STATFILE, "$_ PASS\n";
     121        } else {
     122            print STATFILE, "$_ FAIL\n";
     123        }
    124124    }
    125125}
    126126close(I);
     127close(STATFILE);
    127128
    128129for ($i = 0; $i < $threads; $i++) {
     
    130131}
    131132
    132 # fork the tars
     133# fork the rsync
    133134my @pids = ();
    134135for ($i = 0; $i < $threads; $i++) {
     
    146147    }
    147148}
     149
    148150my $global_status = 0;
    149151for ($i = 0; $i < $threads; $i++) {
     
    157159#   unlink("${local_tmp}/${input_base}.${i}");
    158160}
     161
     162my $scp_command = "$scp_cmd $option ${local_tmp}/${input_base}.stat $hosts[0]:/tmp/";
     163print "$scp_command\n";
     164system("$scp_command");
     165# XXX check return status
    159166
    160167print "global status: $global_status\n";
Note: See TracChangeset for help on using the changeset viewer.