IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 1, 2013, 10:05:15 AM (13 years ago)
Author:
bills
Message:

if a component data_state is 'update' but run state is cleaned change run state

File:
1 edited

Legend:

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

    r35937 r36166  
    304304            }
    305305            $queued_update = 1;
     306        } elsif ($chip->{state} eq 'cleaned' and $chip->{data_state} eq 'update') {
     307            # we've had a number of runs in this limbo state
     308
     309            my $command = "$chiptool -updaterun -set_state update -chip_id $chip_id";
     310            $command .= " -set_label $rlabel" if $rlabel;
     311
     312            if (!$no_update) {
     313                my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     314                            run(command => $command, verbose => $verbose);
     315                unless ($success) {
     316                    my_die("failed to change ${stage}Run $stage_id $component from goto_cleaned to update", $PS_EXIT_UNKNOWN_ERROR);
     317                }
     318            } else {
     319                print "skipping $command\n";
     320            }
     321            $queued_update = 1;
    306322        } elsif ($chip->{fault}) {
    307323            $fault_count++;
     
    460476            print "skipping $command\n";
    461477        }
     478    } elsif ($chips_ready and $skycell->{data_state} eq 'update' and $skycell->{state} ne 'update') {
     479        my $command = "$warptool -updaterun -warp_id $warp_id -set_state update";
     480        $command .= " -set_label $rlabel" if $rlabel;
     481
     482        if (!$no_update) {
     483            my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     484                        run(command => $command, verbose => $verbose);
     485            unless ($success) {
     486                my_die("failed to change state of ${stage}Run $stage_id to update", $PS_EXIT_UNKNOWN_ERROR);
     487            }
     488        } else {
     489            print "skipping $command\n";
     490        }
     491
    462492    } elsif (scalar @chipsToUpdate > 0) {
    463493        my $fault = check_states_chip($chip_id, \@chipsToUpdate, $rlabel, $need_magic);
Note: See TracChangeset for help on using the changeset viewer.