IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 29, 2009, 3:17:29 PM (17 years ago)
Author:
bills
Message:

various changes to the postage stamp server.

File:
1 edited

Legend:

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

    r25957 r26289  
    2525use PS::IPP::PStamp::Job qw( :standard );
    2626
    27 my ( $dep_id, $dep_state, $stage, $stage_id, $imagedb, $rlabel, $no_magic, $dbname, $dbserver);
     27my ( $dep_id, $dep_state, $stage, $stage_id, $imagedb, $no_magic, $dbname, $dbserver);
    2828my ( $no_update, $verbose, $save_temps, $logfile);
    2929
     
    3434           'stage_id=s'     => \$stage_id,
    3535           'imagedb=s'      => \$imagedb,
    36            'rlabel=s'       => \$rlabel,
    3736           'no-magic=s'     => \$no_magic,
    3837           'dbname=s'       => \$dbname,
     
    4645pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
    4746
    48 die "--dep_id --state --stage --stage_id --imagedb and --rlabel are requried \n"
    49     if !$dep_id or !$dep_state or !$stage or !$stage_id or !$imagedb or !$rlabel;
     47die "--dep_id --state --stage --stage_id and --imagedb are requried \n"
     48    if !$dep_id or !$dep_state or !$stage or !$stage_id or !$imagedb;
    5049
    5150my $ipprc = PS::IPP::Config->new(); # IPP Configuration
     
    103102    } else {
    104103
    105         # XXX: TODO set label to the "standard" update value
    106 
    107104        # don't update if in runs are in state goto_cleaned, wait for clean to finish
    108105        if ($state eq "cleaned") {
    109             runcommand("$chiptool -dbname $imagedb -chip_id $stage_id -updaterun -set_state update");
    110         }
    111 
    112         # don't update yet if magicDSRuns are in state goto_purged, wait for purge to finish
    113         if ($magic_ds_state eq "purged") {
     106            runcommand("$chiptool -dbname $imagedb -chip_id $stage_id -updaterun -set_state update -set_label update");
     107        }
     108
     109        # don't update yet if magicDSRuns are in state goto_cleaned, wait for purge to finish
     110        if ($magic_ds_state eq "cleaned") {
    114111            my $magic_ds_id = $run_state->{magic_ds_id};
    115112            runcommand("$magicdstool -dbname $imagedb -magic_ds_id $magic_ds_id -updaterun -set_state new");
     
    145142    } else {
    146143
    147         # XXX: TODO set label to the "standard" update value
    148 
    149144        # don't update if in runs are in state goto_cleaned, wait for clean to finish
    150145        if ($state eq 'cleaned') {
    151             runcommand("$warptool -dbname $imagedb -warp_id $stage_id -updaterun -set_state update");
     146            runcommand("$warptool -dbname $imagedb -warp_id $stage_id -updaterun -set_state update -set_label update");
    152147        }
    153148
    154149        if ($chip_state eq 'cleaned') {
    155150            my $chip_id = $run_state->{chip_id};
    156             runcommand("$chiptool -dbname $imagedb -chip_id $chip_id -updaterun -set_state update");
    157         }
    158 
    159         # don't update yet if magicDSRuns are in state goto_purged, wait for purge to finish
    160         if ($magic_ds_state eq 'purged') {
     151            runcommand("$chiptool -dbname $imagedb -chip_id $chip_id -updaterun -set_state update -set_label update");
     152        }
     153
     154        # don't update yet if magicDSRuns are in state goto_cleaned, wait for purge to finish
     155        if ($magic_ds_state eq 'cleaned') {
    161156            my $magic_ds_id = $run_state->{magic_ds_id};
    162157            runcommand("$magicdstool -dbname $imagedb -magic_ds_id $magic_ds_id -updaterun -set_state new");
     
    190185        }
    191186        return join "", @$stdout_buf if defined wantarray();
     187        return $success;
    192188    } else {
    193189        print STDERR "skipping $command\n";
    194190    }
     191    return 1;
    195192}
    196193
Note: See TracChangeset for help on using the changeset viewer.