IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 1, 2008, 5:42:05 PM (18 years ago)
Author:
bills
Message:

get web page working again with job sequencing through the database

File:
1 edited

Legend:

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

    r16280 r16283  
    9696}
    9797
     98my $jobStatus;
    9899{
    99100    my $command = "$ppstamp -file $uri $outputBase $argString";
    100101    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    101102        run(command => $command, verbose => $verbosity);
    102 ###
    103 ### update the status of the job with the error
    104 ###
    105     unless ($success) {
    106         die("Unable to perform $command: $error_code");
     103
     104    if ($success) {
     105        $jobStatus = "ok";
     106    } else {
     107        $jobStatus = $error_code;
     108        print STDERR "ppstamp failed with error code $error_code\n";
    107109    }
     110#    unless ($success) {
     111#        die("Unable to perform $command: $error_code");
     112#    }
    108113}
    109114
    110115
     116# stop the job and set the error status
    111117{
    112     my $command = "$pstamptool -processedjob -job_id $job_id -state stop -status ok";
     118    my $command = "$pstamptool -processedjob -job_id $job_id -state stop -status $jobStatus";
    113119    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    114120        run(command => $command, verbose => $verbosity);
     
    119125
    120126
    121 exit 0;
     127exit $jobStatus;
Note: See TracChangeset for help on using the changeset viewer.