IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 26289 for trunk/pstamp/scripts


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

various changes to the postage stamp server.

Location:
trunk/pstamp/scripts
Files:
5 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
  • trunk/pstamp/scripts/pstamp_finish.pl

    r26048 r26289  
    315315    my $comment = $row->{COMMENT};
    316316    $comment = "null" if !$comment;
    317     my $label = $row->{LABEL};
    318     $label = "null" if !$label;
     317    my $data_group = $row->{DATA_GROUP};
     318    if (!defined $data_group) {
     319        # XXX: backwards compatibility hook. Remove "soon".
     320        $data_group = $row->{LABEL};
     321    }
     322    $data_group = "null" if !$data_group;
    319323
    320324    # This is ugly, error prone and hard to change.
    321325    # Create a results file module and provide a list of the names (we have the data in the columns)
    322326    my $rowinfo = "$row->{PROJECT}|$row->{JOB_TYPE}|$row->{REQ_TYPE}|$row->{IMG_TYPE}|";
    323     $rowinfo   .= "$row->{ID}|$tess_id|$component|$label|$row->{OPTION_MASK}|$row->{MJD_MIN}|$row->{MJD_MAX}|";
     327    $rowinfo   .= "$row->{ID}|$tess_id|$component|$data_group|$row->{OPTION_MASK}|$row->{MJD_MIN}|$row->{MJD_MAX}|";
    324328    $rowinfo   .= "$row->{REQFILT}|$row->{COORD_MASK}|$row->{CENTER_X}|$row->{CENTER_Y}|";
    325329    $rowinfo   .= "$row->{WIDTH}|$row->{HEIGHT}|";
  • trunk/pstamp/scripts/pstamp_request_file

    r25736 r26289  
    6969        { name => 'COMPONENT',  type => '64A', writetype => TSTRING },
    7070
    71         { name => 'LABEL ',     type => '64A', writetype => TSTRING },
     71        { name => 'DATA_GROUP ',type => '64A', writetype => TSTRING },
    7272
    7373        { name => 'REQFILT',    type => '16A', writetype => TSTRING },
     
    324324    print "  REQ_NAME EXTVER\n\n";
    325325    print "REQUEST specification (1 or more lines). Format:\n\n";
    326     print "  ROWNUM CENTER_X CENTER_Y WIDTH HEIGHT COORD_MASK JOB_TYPE OPTION_MASK PROJECT REQ_TYPE IMG_TYPE ID TESS_ID COMPONENT LABEL REQFILT MJD_MIN MJD_MAX | COMMENT\n\n";
     326    print "  ROWNUM CENTER_X CENTER_Y WIDTH HEIGHT COORD_MASK JOB_TYPE OPTION_MASK PROJECT REQ_TYPE IMG_TYPE ID TESS_ID COMPONENT DATA_GROUP REQFILT MJD_MIN MJD_MAX | COMMENT\n\n";
    327327
    328328    exit 0;
  • trunk/pstamp/scripts/pstamp_results_file.pl

    r25739 r26289  
    9090        { name => 'TESS_ID',    type => '64A', writetype => TSTRING },   
    9191        { name => 'COMPONENT',  type => '64A', writetype => TSTRING },   
    92         { name => 'LABEL',      type => '64A', writetype => TSTRING },   
     92        { name => 'DATA_GROUP', type => '64A', writetype => TSTRING },   
    9393
    9494        # output parameters
  • trunk/pstamp/scripts/pstampparse.pl

    r26242 r26289  
    193193    my $mjd_min = $row->{MJD_MIN};
    194194    my $mjd_max = $row->{MJD_MAX};
    195     my $label   = $row->{LABEL};
     195    my $data_group = $row->{DATA_GROUP};
     196    if (!defined $data_group) {
     197        # backwards compatability hook
     198        $data_group = $row->{LABEL};
     199    }
     200       
    196201    my $x       = $row->{CENTER_X};
    197202    my $y       = $row->{CENTER_Y};
     
    272277    # request specification. An array reference is returned.
    273278    $imageList = locate_images($ipprc, $image_db, $req_type, $stage, $id, $tess_id, $search_component,
    274                 $inverse, $need_magic, $x, $y, $mjd_min, $mjd_max, $filter, $label, $verbose);
     279                $inverse, $need_magic, $x, $y, $mjd_min, $mjd_max, $filter, $data_group, $verbose);
    275280
    276281    if (!$imageList or !@$imageList) {
     
    424429                    # set up to queue an update run
    425430                    queue_update_run(\$newState, \$fault, \$dep_id, $image->{image_db},
    426                         $run_state, $stage, $image->{stage_id}, $need_magic, $image->{label});
     431                        $run_state, $stage, $image->{stage_id}, $need_magic);
    427432                }
    428433            }
     
    548553                # we collected a set of sky coordinates above.
    549554                # filter the images so that only those that contain the centers of the ROIs are processed
    550                 my $command = "$dvoImagesAtCoords $pointsListName";
     555                my $command = "$dvoImagesAtCoords -coords $pointsListName";
    551556                if ($have_skycells) {
    552557                    my $tess_id = $thisRun->[0]->{tess_id};
     
    671676                    # set up to queue an update run
    672677                    queue_update_run(\$newState, \$fault, \$dep_id, $image->{image_db},
    673                         $run_state, $stage, $image->{stage_id}, $need_magic, $image->{label});
     678                        $run_state, $stage, $image->{stage_id}, $need_magic);
    674679                }
    675680            }
     
    801806    return 0 if ($r1->{TESS_ID}  ne $r2->{TESS_ID});
    802807    return 0 if ($r1->{REQFILT}  ne $r2->{REQFILT});
    803     return 0 if ($r1->{LABEL}    ne $r2->{LABEL});
     808    return 0 if ($r1->{DATA_GROUP}    ne $r2->{DATA_GROUP});
    804809    return 0 if ($r1->{MJD_MIN}  ne $r2->{MJD_MAX});
    805810    return 0 if ($r1->{MJD_MAX}  ne $r2->{MJD_MAX});
     
    850855sub queue_update_run
    851856{
    852     my ($r_jobState, $r_fault, $r_dep_id, $imagedb, $state, $stage, $stage_id, $need_magic, $label) = @_;
     857    my ($r_jobState, $r_fault, $r_dep_id, $imagedb, $state, $stage, $stage_id, $need_magic) = @_;
    853858
    854859    if (($state ne 'cleaned') and ($state ne 'update') and ($state ne 'goto_cleaned')) {
     
    858863    my $dep_id;
    859864    my $command = "$pstamptool -getdependent -stage $stage -stage_id $stage_id -imagedb $imagedb";
    860     $command .= " -rlabel $label" if $label;
    861865    $command .= " -no_magic" if !$need_magic;
    862866    if (!$no_update) {
Note: See TracChangeset for help on using the changeset viewer.