IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 24743


Ignore:
Timestamp:
Jul 10, 2009, 5:53:18 PM (17 years ago)
Author:
watersc1
Message:

Altered ippTools to support scrubbed as a full state like cleaned.

Changed ipp_cleanup.pl to insist that config files exist if a run is to be cleaned, and that the config files not exist if a run is to be scrubbed.

Added science.cleanup.pro to Makefile.am to ensure it is installed properly.

Location:
branches/czw_branch/cleanup
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • branches/czw_branch/cleanup/ippScripts/scripts/ipp_cleanup.pl

    r24642 r24743  
    6060
    6161
    62 my %stages = ( chip => 1, camera => 1, fake => 1, warp => 1, stack => 1, diff  => 1,
    63                detrend.process.imfile => 1, detrend.process.exp => 1, detrend.stack.imfile => 1,
    64                detrend.normstat.imfile => 1, detrend.norm.imfile => 1, detrend.norm.exp => 1,
    65                detrend.resid.imfile => 1, detrend.resid.exp => 1 );
     62my %stages = ( "chip" => 1, "camera" => 1, "fake" => 1, "warp" => 1, "stack" => 1, "diff"  => 1,
     63               "detrend.process.imfile" => 1, "detrend.process.exp" => 1, "detrend.stack.imfile" => 1,
     64               "detrend.normstat.imfile" => 1, "detrend.norm.imfile" => 1, "detrend.norm.exp" => 1,
     65               "detrend.resid.imfile" => 1, "detrend.resid.exp" => 1 );
    6666unless ($stages{$stage}) {
    6767    die "unknown stage $stage for ipp_cleanup.pl\n";
     
    119119        # don't clean up unless the data needed to update is available
    120120        # modes goto_purged and goto_scrubbed will remove files even if the config is non-existent
     121        # goto_scrubbed now requires the config file to not exist.
    121122        if ($mode eq "goto_cleaned") {
    122123            my $config_file = $ipprc->filename("PPIMAGE.CONFIG", $path_base, $class_id);
    123             print STDERR "CHIP: CONFIG_FILE : $config_file\n";
     124
    124125            if (!$config_file or ! -e $config_file) {
    125126                print STDERR "skipping cleanup for chipRun $stage_id $class_id "
     
    128129            }
    129130        }
     131        elsif ($mode eq "goto_scrubbed") {
     132            my $config_file = $ipprc->filename("PPIMAGE.CONFIG", $path_base, $class_id);
     133
     134            if ($config_file and -e $config_file) {
     135                print STDERR "skipping scrubbed for chipRun $stage_id $class_id "
     136                    . " because config file is present\n";
     137                $status = 0;
     138            }
     139        }
    130140
    131141        if ($status) {
     
    160170            if ($mode eq "goto_purged") {
    161171                $command .= " -topurgedimfile";
    162             } else {
     172            }
     173            elsif ($mode eq "goto_cleaned") {
    163174                $command .= " -tocleanedimfile";
    164175            }
     176            elsif ($mode eq "goto_scrubbed") {
     177                $command .= " -toscrubbedimfile";
     178            }
     179
    165180            $command .= " -dbname $dbname" if defined $dbname;
    166181
     
    218233    my $status = 1;
    219234    # don't clean up unless the data needed to update is available
     235    # goto_scrubbed now requires the config file to not be present
    220236    if ($mode eq "goto_cleaned") {
    221237        my $config_file = $ipprc->filename("PSASTRO.CONFIG", $path_base);
     
    225241            $status = 0;
    226242        }
     243    }
     244    elsif ($mode eq "goto_scrubbed") {
     245        my $config_file = $ipprc->filename("PSASTRO.CONFIG", $path_base);
     246
     247        if ($config_file and -e $config_file) {
     248            print STDERR "skipping cleanup for camRun $stage_id because config file ($config_file) is present\n";
     249            $status = 0;
     250        }
    227251    }
    228252    if ($status) {
     
    246270        }
    247271        if ($mode eq "goto_scrubbed") {
    248             $command = "$camtool -updaterun -cam_id $stage_id -set_state cleaned";
     272            $command = "$camtool -updaterun -cam_id $stage_id -set_state scrubbed";
    249273        }
    250274        if ($mode eq "goto_purged") {
     
    311335            }
    312336        }
     337        elsif ($mode eq "goto_scrubbed") {
     338            my $config_file = $ipprc->filename("PSWARP.CONFIG", $path_base, $skycell_id);
     339
     340            if ($config_file and -e $config_file) {
     341                print STDERR "skipping scrubbed for warpRun $stage_id $skycell_id" .
     342                    " because config file is present\n";
     343                $status = 0;
     344            }
     345        }
    313346        if ($status) {
    314347            # delete the temporary image datafiles
     
    337370            if ($mode eq "goto_purged") {
    338371                $command .= " -topurgedskyfile";
    339             } else {
     372            }
     373            elsif ($mode eq "goto_cleaned") {
    340374                $command .= " -tocleanedskyfile";
    341375            }
     376            elsif ($mode eq "goto_scrubbed") {
     377                $command .= " -toscrubbedskyfile";
     378            }
    342379            $command .= " -dbname $dbname" if defined $dbname;
    343380
     
    395432        if ($mode eq "goto_cleaned") {
    396433            my $config_file = $ipprc->filename("PPSTACK.CONFIG", $path_base, $skycell_id);
    397             print STDERR "MY CONFIG FILE = $config_file\n";
    398             printf(STDERR "BOOLS: %d %d %d %s\n",!$config_file, ! -e $config_file, -e $config_file,$config_file);
     434
    399435            $config_file =~ s%^file://%%;
    400436            if (!$config_file or ! -e $config_file) {
     
    404440            }
    405441            $config_file = 'file://' . $config_file;
     442        }
     443        elsif ($mode eq "goto_scrubbed") {
     444            my $config_file = $ipprc->filename("PPSTACK.CONFIG", $path_base, $skycell_id);
     445            $config_file =~ s%^file://%%;
     446            if ($config_file and -e $config_file) {
     447                print STDERR "skipping scrubbed for stackRun $stage_id $skycell_id" .
     448                    " because config file is present\n";
     449                $status = 0;
     450            }
    406451        }
    407452        if ($status) {
     
    428473            if ($mode eq "goto_purged") {
    429474                $command .= " -updaterun -state purged";
    430             } else {
     475            }
     476            elsif ($mode eq "goto_cleaned") {
    431477                $command .= " -updaterun -state cleaned";
     478            }
     479            elsif ($mode eq "goto_scrubbed") {
     480                $command .= " -updaterun -state scrubbed";
    432481            }
    433482            $command .= " -dbname $dbname" if defined $dbname;
     
    485534        if ($mode eq "goto_cleaned") {
    486535            my $config_file = $ipprc->filename("PPSUB.CONFIG", $path_base, $skycell_id);
    487             print STDERR "MY CONFIG FILE = $config_file\n";
    488             printf(STDERR "BOOLS: %d %d %d %s\n",!$config_file, ! -e $config_file, -e $config_file,$config_file);
     536
    489537            $config_file =~ s%^file://%%;
    490538            if (!$config_file or ! -e $config_file) {
     
    494542            }
    495543            $config_file = 'file://' . $config_file;
     544        }
     545        elsif ($mode eq "goto_scrubbed") {
     546            my $config_file = $ipprc->filename("PPSUB.CONFIG", $path_base, $skycell_id);
     547            $config_file =~ s%^file://%%;
     548            if ($config_file and -e $config_file) {
     549                print STDERR "skipping scrubbed for diffRun $stage_id $skycell_id" .
     550                    " because config file ($config_file) is present\n";
     551                $status = 0;
     552            }
    496553        }
    497554        if ($status) {
     
    529586        if ($status) {
    530587            my $command = "$difftool -diff_id $stage_id";
    531 #           my $command = "$difftool -diff_id $stage_id -skycell_id $skycell_id";
     588
    532589            if ($mode eq "goto_purged") {
    533590                $command .= " -updaterun -state purged";
    534             } else {
     591            }
     592            elsif ($mode eq "goto_cleaned") {
    535593                $command .= " -updaterun -state cleaned";
    536594            }
     595            elsif ($mode eq "goto_scrubbed") {
     596                $command .= " -updaterun -state scrubbed";
     597            }
     598
    537599            $command .= " -dbname $dbname" if defined $dbname;
    538600           
     
    545607        } else {
    546608            my $command = "$difftool -updaterun -diff_id $stage_id -state $error_state";
    547 #           my $command = "$difftool -updaterun -diff_id $stage_id -skycell_id $skycell_id -state $error_state";
     609
    548610            $command .= " -dbname $dbname" if defined $dbname;
    549611           
     
    560622}
    561623if ($stage eq 'fake') {
    562     die "ipp_cleanup.pl -stage fake not yet implemented. Probably will just mark database cleaned.\n";
     624    print STDERR "This does not seem to work at present, as no files exist. Terminating quietly.\n";
     625    exit(0);
     626    die "--stage_id required for stage fake\n" if !$stage_id;
     627    ### select the imfiles for this entry
     628
     629    # this stage uses 'chiptool'
     630    my $faketool = can_run('faketool') or die "Can't find faketool";
     631
     632    # Get list of component imfiles
     633    # XXX may need a different my_die for each stage
     634    my $imfiles;                      # Array of component files
     635    my $command = "$faketool -pendingcleanupimfile -fake_id $stage_id"; # Command to run
     636    $command .= " -dbname $dbname" if defined $dbname;
     637    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = run(command => $command, verbose => $verbose);
     638    unless ($success) {
     639        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     640        &my_die("Unable to perform faketool: $error_code", "fake", $stage_id, $error_code);
     641    }
     642
     643    # if there are no fakeProcessedImfiles (@$stdout_buf == 0), the reset the state to 'new'
     644    if (@$stdout_buf == 0)  {
     645        my $command = "$faketool -fake_id $stage_id -updaterun -set_state new";
     646        $command .= " -dbname $dbname" if defined $dbname;
     647
     648        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     649            run(command => $command, verbose => $verbose);
     650        unless ($success) {
     651            $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     652            &my_die("Unable to perform faketool: $error_code", "fake", $stage_id, $error_code);
     653        }
     654        exit 0;
     655    }
     656
     657    my $metadata = $mdcParser->parse(join "", @$stdout_buf) or
     658        &my_die("Unable to parse metadata config doc", "fake", $stage_id, $PS_EXIT_PROG_ERROR);
     659
     660    # extract the metadata for the files into a hash list
     661    $imfiles = parse_md_list($metadata) or
     662        &my_die("Unable to parse metadata list", "fake", $stage_id, $PS_EXIT_PROG_ERROR);
     663
     664    # loop over all of the imfiles, determine the path_base and class_id for each
     665    foreach my $imfile (@$imfiles) {
     666        my $class_id = $imfile->{class_id};
     667        my $path_base = $imfile->{path_base};
     668        my $status = 1;
     669
     670        # don't clean up unless the data needed to update is available
     671        # modes goto_purged and goto_scrubbed will remove files even if the config is non-existent
     672        # goto_scrubbed now requires the config file to not exist.
     673        if ($mode eq "goto_cleaned") {
     674            my $config_file = $ipprc->filename("PPSIM.CONFIG", $path_base, $class_id);
     675
     676            if (!$config_file or ! -e $config_file) {
     677                print STDERR "skipping cleanup for fakeRun $stage_id $class_id "
     678                    . " because config file is missing\n";
     679                $status = 0;
     680            }
     681        }
     682        elsif ($mode eq "goto_scrubbed") {
     683            my $config_file = $ipprc->filename("PPSIM.CONFIG", $path_base, $class_id);
     684
     685            if ($config_file and -e $config_file) {
     686                print STDERR "skipping scrubbed for fakeRun $stage_id $class_id "
     687                    . " because config file is present\n";
     688                $status = 0;
     689            }
     690        }
     691
     692        if ($status) {
     693            # array of actual filenames to delete
     694            my @files = ();
     695
     696            # delete the temporary image datafiles
     697            addFilename (\@files, "PPSIM.OUTPUT.MEF", $path_base, $class_id);
     698            addFilename (\@files, "PPSIM.OUTPUT.SPL", $path_base, $class_id);
     699            addFilename (\@files, "PPSIM.FAKE.CHIP", $path_base, $class_id);
     700            addFilename (\@files, "PPSIM.FORCE.CHIP", $path_base, $class_id);
     701            if ($mode eq "goto_purged") {
     702                # additional files to remove for 'purge' mode
     703                addFilename (\@files, "PPSIM.SOURCES", $path_base, $class_id);
     704                addFilename (\@files, "PPSIM.FAKE.SOURCES", $path_base, $class_id);
     705                addFilename (\@files, "PPSIM.FORCE.SOURCES", $path_base, $class_id);
     706            }
     707
     708            # actual command to delete the files
     709            $status = &delete_files (\@files);
     710        }
     711
     712        if ($status)  {
     713            my $command = "$faketool -fake_id $stage_id -class_id $class_id";
     714            if ($mode eq "goto_purged") {
     715                $command .= " -topurgedimfile";
     716            }
     717            elsif ($mode eq "goto_cleaned") {
     718                $command .= " -tocleanedimfile";
     719            }
     720            elsif ($mode eq "goto_scrubbed") {
     721                $command .= " -toscrubbedimfile";
     722            }
     723
     724            $command .= " -dbname $dbname" if defined $dbname;
     725
     726            my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     727                    run(command => $command, verbose => $verbose);
     728            unless ($success) {
     729                $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     730                &my_die("Unable to perform faketool: $error_code", "fake", $stage_id, $error_code);
     731            }
     732        } else {
     733
     734            # if an error happens for one chip, the chipRun will stay in goto_*, but the chips will go to error_* (matching the goto_*)
     735            my $command = "$faketool -updateprocessedimfile -fake_id $stage_id -class_id $class_id -set_state $error_state";
     736            $command .= " -dbname $dbname" if defined $dbname;
     737
     738            my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     739                    run(command => $command, verbose => $verbose);
     740            unless ($success) {
     741                $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     742                &my_die("Unable to perform faketool: $error_code", "fake", $stage_id, $error_code);
     743            }
     744        }
     745    }
     746    exit 0;
     747
    563748}
    564749# fake : faketool : -pendingcleanupimfile (loop over imfiles)
  • branches/czw_branch/cleanup/ippTasks/Makefile.am

    r24512 r24743  
    2424        pstamp.pro \
    2525        receive.pro \
    26         publish.pro
     26        publish.pro \
     27        science.cleanup.pro
    2728
    2829other_files = \
  • branches/czw_branch/cleanup/ippTools/share/camtool_pendingcleanupexp.sql

    r19528 r24743  
    1313    USING(cam_id)
    1414WHERE
    15     (camRun.state = 'goto_cleaned' OR camRun.state = 'goto_purged')
     15    (camRun.state = 'goto_cleaned' OR camRun.state = 'goto_purged' OR camRun.state = 'goto_scrubbed')
    1616
  • branches/czw_branch/cleanup/ippTools/share/camtool_pendingcleanuprun.sql

    r19528 r24743  
    99USING (exp_id)
    1010WHERE
    11     (camRun.state = 'goto_cleaned' OR camRun.state = 'goto_purged')
     11    (camRun.state = 'goto_cleaned' OR camRun.state = 'goto_purged' OR camRun.state = 'goto_scrubbed')
  • branches/czw_branch/cleanup/ippTools/share/faketool_pendingcleanupimfile.sql

    r19092 r24743  
    1313    USING(fake_id)
    1414WHERE
    15     fakeRun.state = 'goto_cleaned'
     15    ((fakeRun.state = 'goto_cleaned' AND fakeProcessedImfile.data_state = 'full')
     16OR
     17    (fakeRun.state = 'goto_scrubbed' AND fakeProcessedImfile.data_state = 'full')
     18OR
     19    (fakeRun.state = 'goto_purged' AND fakeProcessedImfile.data_state != 'purged'))
  • branches/czw_branch/cleanup/ippTools/share/faketool_pendingcleanuprun.sql

    r19092 r24743  
    1111USING (exp_id)
    1212WHERE
    13     fakeRun.state = 'goto_cleaned'
     13    (fakeRun.state = 'goto_cleaned' OR fakeRun.state = 'goto_scrubbed' OR fakeRun.state = 'goto_purged')
     14
  • branches/czw_branch/cleanup/ippTools/src/chiptool.c

    r24562 r24743  
    5454static bool tofullimfileMode(pxConfig *config);
    5555static bool topurgedimfileMode(pxConfig *config);
     56static bool toscrubbedimfileMode(pxConfig *config);
    5657static bool exportrunMode(pxConfig *config);
    5758static bool importrunMode(pxConfig *config);
     
    9394        MODECASE(CHIPTOOL_MODE_TOFULLIMFILE,            tofullimfileMode);
    9495        MODECASE(CHIPTOOL_MODE_TOPURGEDIMFILE,          topurgedimfileMode);
     96        MODECASE(CHIPTOOL_MODE_TOSCRUBBEDIMFILE,        toscrubbedimfileMode);
    9597        MODECASE(CHIPTOOL_MODE_EXPORTRUN,               exportrunMode);
    9698        MODECASE(CHIPTOOL_MODE_IMPORTRUN,               importrunMode);
     
    13331335    return change_imfile_data_state(config, "purged", "goto_purged");
    13341336}
    1335 
     1337static bool toscrubbedimfileMode(pxConfig *config)
     1338{
     1339  return change_imfile_data_state(config, "scrubbed", "goto_scrubbed");
     1340}
    13361341bool exportrunMode(pxConfig *config)
    13371342{
  • branches/czw_branch/cleanup/ippTools/src/chiptool.h

    r23339 r24743  
    4545    CHIPTOOL_MODE_TOFULLIMFILE,
    4646    CHIPTOOL_MODE_TOPURGEDIMFILE,
     47    CHIPTOOL_MODE_TOSCRUBBEDIMFILE,
    4748    CHIPTOOL_MODE_EXPORTRUN,
    4849    CHIPTOOL_MODE_IMPORTRUN
  • branches/czw_branch/cleanup/ippTools/src/chiptoolConfig.c

    r24562 r24743  
    248248    psMetadataAddStr(topurgedimfileArgs, PS_LIST_TAIL, "-class_id",  0,        "class ID to update", NULL);
    249249
     250    // -toscrubbedimfile
     251    psMetadata *toscrubbedimfileArgs = psMetadataAlloc();
     252    psMetadataAddS64(toscrubbedimfileArgs, PS_LIST_TAIL, "-chip_id", 0,        "chip ID to update", 0);
     253    psMetadataAddStr(toscrubbedimfileArgs, PS_LIST_TAIL, "-class_id", 0,       "class ID to update", NULL);
     254
    250255    // -exportrun
    251256    psMetadata *exportrunArgs = psMetadataAlloc();
     
    282287    PXOPT_ADD_MODE("-tofullimfile",         "set imfile state to full",              CHIPTOOL_MODE_TOFULLIMFILE,         tofullimfileArgs);
    283288    PXOPT_ADD_MODE("-topurgedimfile",       "set imfile state to purged",            CHIPTOOL_MODE_TOPURGEDIMFILE,       topurgedimfileArgs);
     289    PXOPT_ADD_MODE("-toscrubbedimfile",     "set imfile state to scrubbed",          CHIPTOOL_MODE_TOSCRUBBEDIMFILE,     toscrubbedimfileArgs);
    284290
    285291    PXOPT_ADD_MODE("-exportrun",            "export run for import on other database", CHIPTOOL_MODE_EXPORTRUN, exportrunArgs);
  • branches/czw_branch/cleanup/ippTools/src/faketool.c

    r24562 r24743  
    5252static bool tofullimfileMode(pxConfig *config);
    5353static bool topurgedimfileMode(pxConfig *config);
     54static bool toscrubbedimfileMode(pxConfig *config);
    5455static bool exportrunMode(pxConfig *config);
    5556static bool importrunMode(pxConfig *config);
     
    9192        MODECASE(FAKETOOL_MODE_TOFULLIMFILE,            tofullimfileMode);
    9293        MODECASE(FAKETOOL_MODE_TOPURGEDIMFILE,          topurgedimfileMode);
     94        MODECASE(FAKETOOL_MODE_TOSCRUBBEDIMFILE,        toscrubbedimfileMode);
    9395        MODECASE(FAKETOOL_MODE_EXPORTRUN,               exportrunMode);
    9496        MODECASE(FAKETOOL_MODE_IMPORTRUN,               importrunMode);
     
    12511253    return change_imfile_data_state(config, "purged", "goto_purged");
    12521254}
     1255static bool toscrubbedimfileMode(pxConfig *config)
     1256{
     1257     return change_imfile_data_state(config, "scrubbed", "goto_scrubbed");
     1258}
    12531259
    12541260bool exportrunMode(pxConfig *config)
  • branches/czw_branch/cleanup/ippTools/src/faketool.h

    r23339 r24743  
    4545    FAKETOOL_MODE_TOFULLIMFILE,
    4646    FAKETOOL_MODE_TOPURGEDIMFILE,
     47    FAKETOOL_MODE_TOSCRUBBEDIMFILE,
    4748    FAKETOOL_MODE_EXPORTRUN,
    4849    FAKETOOL_MODE_IMPORTRUN
  • branches/czw_branch/cleanup/ippTools/src/faketoolConfig.c

    r24562 r24743  
    301301    psMetadataAddStr(topurgedimfileArgs, PS_LIST_TAIL, "-class_id",  0,        "class ID to update", NULL);
    302302
     303    // -toscrubbedimfile
     304    psMetadata *toscrubbedimfileArgs = psMetadataAlloc();
     305    psMetadataAddS64(toscrubbedimfileArgs, PS_LIST_TAIL, "-fake_id", 0,         "fake ID to update", 0);
     306    psMetadataAddStr(toscrubbedimfileArgs, PS_LIST_TAIL, "-class_id", 0,        "class ID to update", NULL);
     307
    303308    // -exportrun
    304309    psMetadata *exportrunArgs = psMetadataAlloc();
     
    337342    PXOPT_ADD_MODE("-tofullimfile",        "set imfile state to full",               FAKETOOL_MODE_TOFULLIMFILE,         tofullimfileArgs);
    338343    PXOPT_ADD_MODE("-topurgedimfile",      "set imfile state to purged",             FAKETOOL_MODE_TOPURGEDIMFILE,       topurgedimfileArgs);
     344    PXOPT_ADD_MODE("-toscrubbedimfile",    "set imfile state to scrubbed",           FAKETOOL_MODE_TOSCRUBBEDIMFILE,     toscrubbedimfileArgs);
    339345    PXOPT_ADD_MODE("-exportrun",            "export run for import on other database", FAKETOOL_MODE_EXPORTRUN, exportrunArgs);
    340346    PXOPT_ADD_MODE("-importrun",            "import run from metadata file",           FAKETOOL_MODE_IMPORTRUN, importrunArgs);
  • branches/czw_branch/cleanup/ippTools/src/pxtools.c

    r23918 r24743  
    3737    if (!strcmp(state, "goto_cleaned")) return true;
    3838    if (!strcmp(state, "error_cleaned")) return true;
     39    if (!strcmp(state, "goto_purged")) return true;
     40    if (!strcmp(state, "error_purged")) return true;
    3941    if (!strcmp(state, "goto_scrubbed")) return true;
    4042    if (!strcmp(state, "error_scrubbed")) return true;
     
    4244    if (!strcmp(state, "update")) return true;
    4345    if (!strcmp(state, "purged")) return true;
    44     if (!strcmp(state, "goto_purged")) return true;
    45     if (!strcmp(state, "error_purged")) return true;
    46 
     46    if (!strcmp(state, "scrubbed")) return true;
    4747    return false;
    4848}
    4949
    50 // 'scrubbed' is a virtual state equivalent to cleaned, but allows files to be removed
    51 // even if the config files is missing
     50// 'scrubbed' is no longer a virtual state equivalent to cleaned, but allows files to be removed
     51// even if the config files is missing.  This change was prompted as files that are cleaned can
     52// be regenerated, but that is not certain after being scrubbed.
    5253
    5354
  • branches/czw_branch/cleanup/ippTools/src/warptool.c

    r24562 r24743  
    5353static bool tocleanedskyfileMode(pxConfig *config);
    5454static bool topurgedskyfileMode(pxConfig *config);
     55static bool toscrubbedskyfileMode(pxConfig *config);
    5556static bool tofullskyfileMode(pxConfig *config);
    5657static bool updateskyfileMode(pxConfig *config);
     
    102103        MODECASE(WARPTOOL_MODE_TOCLEANEDSKYFILE,   tocleanedskyfileMode);
    103104        MODECASE(WARPTOOL_MODE_TOPURGEDSKYFILE,    topurgedskyfileMode);
     105        MODECASE(WARPTOOL_MODE_TOSCRUBBEDSKYFILE,  toscrubbedskyfileMode);
    104106        MODECASE(WARPTOOL_MODE_TOFULLSKYFILE,      tofullskyfileMode);
    105107        MODECASE(WARPTOOL_MODE_UPDATESKYFILE,      updateskyfileMode);
     
    16661668    return change_skyfile_data_state(config, "purged", "goto_purged");
    16671669}
     1670static bool toscrubbedskyfileMode(pxConfig *config)
     1671{
     1672     return change_skyfile_data_state(config, "scrubbed", "goto_scrubbed");
     1673}
    16681674
    16691675static bool updateskyfileMode(pxConfig *config)
  • branches/czw_branch/cleanup/ippTools/src/warptool.h

    r24426 r24743  
    4949    WARPTOOL_MODE_TOCLEANEDSKYFILE,
    5050    WARPTOOL_MODE_TOPURGEDSKYFILE,
     51    WARPTOOL_MODE_TOSCRUBBEDSKYFILE,
    5152    WARPTOOL_MODE_TOFULLSKYFILE,
    5253    WARPTOOL_MODE_UPDATESKYFILE,
  • branches/czw_branch/cleanup/ippTools/src/warptoolConfig.c

    r24562 r24743  
    278278    psMetadataAddStr(topurgedskyfileArgs, PS_LIST_TAIL, "-skycell_id", 0, "skycell ID to update", NULL);
    279279
     280    // -toscrubbedskyfile
     281    psMetadata *toscrubbedskyfileArgs = psMetadataAlloc();
     282    psMetadataAddS64(toscrubbedskyfileArgs, PS_LIST_TAIL, "-warp_id", 0, "warptool ID to update", 0);
     283    psMetadataAddStr(toscrubbedskyfileArgs, PS_LIST_TAIL, "-skycell_id", 0, "skycell ID to update", NULL);
     284
    280285    // -tofullskyfile
    281286    psMetadata *tofullskyfileArgs = psMetadataAlloc();
     
    327332    PXOPT_ADD_MODE("-tocleanedskyfile", "set skyfile as cleaned", WARPTOOL_MODE_TOCLEANEDSKYFILE, tocleanedskyfileArgs);
    328333    PXOPT_ADD_MODE("-topurgedskyfile", "set skyfile as purged", WARPTOOL_MODE_TOPURGEDSKYFILE, topurgedskyfileArgs);
     334    PXOPT_ADD_MODE("-toscrubbedskyfile", "set skyfile as scrubbed", WARPTOOL_MODE_TOSCRUBBEDSKYFILE, toscrubbedskyfileArgs);
    329335    PXOPT_ADD_MODE("-tofullskyfile", "set skyfile as full (updated)", WARPTOOL_MODE_TOFULLSKYFILE, tofullskyfileArgs);
    330336    PXOPT_ADD_MODE("-updateskyfile", "update fault code for skyfile", WARPTOOL_MODE_UPDATESKYFILE, updateskyfileArgs);
Note: See TracChangeset for help on using the changeset viewer.