IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 30, 2011, 9:36:02 AM (15 years ago)
Author:
eugene
Message:

merging changes from trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20110213/ippScripts/scripts/summit_copy.pl

    r25418 r31083  
    2222
    2323# Parse the command-line arguments
    24 my ( $uri, $filename, $compress, $bytes, $md5, $nebulous, $exp_name, $inst, $telescope, $class, $class_id,
     24my ( $uri, $filename, $compress, $bytes, $md5, $nebulous, $summit_id, $exp_name, $inst, $telescope, $class, $class_id,
    2525     $dbname, $verbose, $no_update, $no_op, $timeout, $copies );
    2626GetOptions(
     
    3131       'md5=s'          => \$md5,       # reported md5 checksum
    3232       'nebulous'       => \$nebulous,  # use nebulous for the target file
     33       'summit_id=s'    => \$summit_id, # summit_id for this exposure
    3334       'exp_name=s'     => \$exp_name,  # Exposure name
    3435       'inst=s'         => \$inst,      # Instrument
     
    4546
    4647pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
    47 pod2usage( -msg => "Required options: --uri --filename --exp_name --inst --telescope --class --class_id",
     48pod2usage( -msg => "Required options: --uri --filename --summit_id --exp_name --inst --telescope --class --class_id",
    4849       -exitval => 3)
    4950    unless defined $uri
    5051    and defined $filename
     52    and defined $summit_id
    5153    and defined $exp_name
    5254    and defined $inst
     
    110112$command  = "$pztool -copydone";
    111113$command .= " -row_lock";
     114$command .= " -summit_id $summit_id";
    112115$command .= " -exp_name $exp_name";
    113116$command .= " -inst $inst";
     
    236239        my $command;
    237240        $command  = "$pztool -copydone";
     241        $command .= " -summit_id $summit_id";
    238242        $command .= " -exp_name $exp_name";
    239243        $command .= " -inst $inst";
     
    246250
    247251        system ($command);
     252
     253        if ($exit_code == 110) {
     254            $command = "$pztool -updatepzexp";
     255            $command .= " -exp_name $exp_name";
     256            $command .= " -camera $inst";
     257            $command .= " -telescope $telescope";
     258            $command .= " -set_state drop";
     259            $command .= " -dbname $dbname" if defined $dbname;
     260
     261            system ($command);
     262        }
     263
    248264    }
    249265
Note: See TracChangeset for help on using the changeset viewer.