IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 27, 2010, 1:21:34 PM (16 years ago)
Author:
bills
Message:

workaround for the problem described in ticket 1388. If a dependent faults in such
a way that the dependency can never be satisified don't create any more jobs that depends on it.

File:
1 edited

Legend:

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

    r28081 r28145  
    829829            run(command => $command, verbose => $verbose);
    830830        unless ($success) {
    831             my_die("$command failed", $PS_EXIT_UNKNOWN_ERROR);
    832         }
    833         my $output = join "", @$stdout_buf;
    834         chomp $output;
    835         $dep_id = $output;
    836         #
    837         # XXX: need to fault the request or something
    838         my_die("pstamptool -getdependent returned invalid dep_id", $PS_EXIT_PROG_ERROR) if !$dep_id;
     831            my $fault = $error_code >> 8;
     832            print STDERR "$command failed with fault $fault\n";
     833            if ($fault >= 10) {
     834                $$r_dep_id = 0;
     835                $$r_fault = $fault;
     836                $$r_jobState = 'stop';
     837                return;
     838            }
     839            # for now just die. Later pstamptool will return the whole dependent so we can
     840            # examine the fault code
     841            my_die("$command failed with unexpected fault value: $fault", $PS_EXIT_UNKNOWN_ERROR);
     842        } else {
     843            my $output = join "", @$stdout_buf;
     844            chomp $output;
     845            $dep_id = $output;
     846            #
     847            # XXX: need to fault the request or something
     848            my_die("pstamptool -getdependent returned invalid dep_id", $PS_EXIT_PROG_ERROR) if !$dep_id;
     849        }
    839850    } else {
    840851        print STDERR "skipping $command\n";
Note: See TracChangeset for help on using the changeset viewer.