IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 1, 2009, 10:07:51 AM (17 years ago)
Author:
bills
Message:

implement REQ_TYPE byskycell and various other features

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pstamp/scripts/pstamp_job_run.pl

    r25369 r25712  
    1616use PS::IPP::PStamp::RequestFile qw( :standard );
    1717use IPC::Cmd 0.36 qw( can_run run );
     18use POSIX;
    1819
    1920use PS::IPP::Metadata::Config;
     
    9394        run(command => $command, verbose => $verbose);
    9495
    95     if ($success) {
     96    my $exitStatus;
     97    if (WIFEXITED($error_code)) {
     98        $exitStatus = WEXITSTATUS($error_code);
     99    } else {
     100        print STDERR "ppstamp failed error_code: $error_code\n";
     101        $exitStatus = $PS_EXIT_SYS_ERROR;
     102    }
     103
     104    if ($exitStatus == 0) {
    96105        my $dir = dirname($outputBase);
    97106
     
    133142        close F;
    134143        $jobStatus = $PS_EXIT_SUCCESS;
    135     } else {
    136         $jobStatus = $error_code >> 8;
    137         my_die( "ppstamp failed with error code: $jobStatus", $job_id, $jobStatus);
     144    } elsif ($exitStatus == $PSTAMP_NO_OVERLAP) {
     145        $jobStatus = $PSTAMP_NO_OVERLAP
     146    } else {
     147        my_die( "ppstamp failed with error code: $exitStatus", $job_id, $exitStatus);
    138148    }
    139149} elsif ($jobType eq "get_image") {
     
    162172{
    163173    my $command = "$pstamptool -updatejob -job_id $job_id -state stop";
     174    $command .= " -fault $jobStatus" if $jobStatus;
    164175    $command .= " -dbname $dbname" if $dbname;
    165176    $command .= " -dbserver $dbserver" if $dbserver;
Note: See TracChangeset for help on using the changeset viewer.