IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 26, 2010, 4:00:42 PM (16 years ago)
Author:
bills
Message:

if file is unreadable or has a bad EXTNAME set fault to invalid request

File:
1 edited

Legend:

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

    r28224 r29576  
    2323
    2424use PS::IPP::Config qw( :standard );
     25use PS::IPP::PStamp::RequestFile qw( :standard );
    2526
    2627my $req_id;
     
    146147my $reqType;    # for the database
    147148
     149my $request_fault = $PSTAMP_INVALID_REQUEST;
     150
    148151if (-r $uri) {
    149152    # run the appropriate parse command to parse the queue the jobs for this request
     
    157160            $parse_cmd = "$pstampparse";
    158161            $parse_cmd .= " --label $label" if $label;
     162            $request_fault = 0;
    159163        } elsif ($request_type eq "MOPS_DETECTABILITY_QUERY") {
    160164            $reqType = 'dquery';
    161165            $parse_cmd = "$dqueryparse";
    162166            $parse_cmd .= " --label $label" if $label;
     167            $request_fault = 0;
    163168        } else {
    164169            print STDERR "Unknown request type $request_type found in $uri";
     
    182187    my $command = "$pstamptool -updatereq -req_id $req_id -set_state run";
    183188    $command   .= " -set_reqType unknown";
    184     $command   .= " -set_fault $PS_EXIT_DATA_ERROR";
     189    $command   .= " -set_fault $request_fault";
    185190    $command   .= " -dbname $dbname" if $dbname;
    186191    $command   .= " -dbserver $dbserver" if $dbserver;
     
    190195        die("Unable to perform $command error code: $error_code");
    191196    }
    192     exit $PS_EXIT_DATA_ERROR;
     197    exit $request_fault;
    193198}
    194199
Note: See TracChangeset for help on using the changeset viewer.