IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 9, 2011, 11:34:09 AM (15 years ago)
Author:
bills
Message:

Add special fault code PXTOOL_DO_NOT_REVERT_FAULT (value is equal to PSTAMP_GONE (26).
Components with this fault will not be reverted during update processing and will not be set to update
once cleaned.
When setting warps and diffs to be updated clear fault. chip and destreak already do this.
Deleted some code that is no longer used.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/src/warptool.c

    r29903 r30544  
    14851485    PXOPT_COPY_S16(config->args, where, "-fault",      "warpSkyfile.fault", "==");
    14861486
     1487    PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false);
     1488
    14871489    if (!psListLength(where->list)
    14881490        && !psMetadataLookupBool(NULL, config->args, "-all")) {
     
    15101512    }
    15111513    psFree(where);
     1514
     1515    if (!fault) {
     1516        // If fault has not been supplied, don't revert update faults with the magic value
     1517        // We don't do this for new runs because then they would never complete
     1518        // quality should be used to drop bad components
     1519        psStringAppend(&query_updated, " AND fault != %d", PXTOOL_DO_NOT_REVERT_FAULT);
     1520    }
    15121521
    15131522    if (!p_psDBRunQuery(config->dbh, query)) {
     
    20032012// shared code for the modes -tocleanedskyfile -tofullskyfile -topurgedskyfile
    20042013
    2005 static bool change_skyfile_data_state(pxConfig *config, psString data_state, psString run_state)
     2014static bool change_skyfile_data_state(pxConfig *config, psString data_state)
    20062015{
    20072016    PS_ASSERT_PTR_NON_NULL(config, false);
     
    20652074static bool tocleanedskyfileMode(pxConfig *config)
    20662075{
    2067     return change_skyfile_data_state(config, "cleaned", "goto_cleaned");
     2076    return change_skyfile_data_state(config, "cleaned");
    20682077}
    20692078static bool tofullskyfileMode(pxConfig *config)
    20702079{
    2071     return change_skyfile_data_state(config, "full", "update");
     2080    return change_skyfile_data_state(config, "full");
    20722081}
    20732082static bool topurgedskyfileMode(pxConfig *config)
    20742083{
    2075     return change_skyfile_data_state(config, "purged", "goto_purged");
     2084    return change_skyfile_data_state(config, "purged");
    20762085}
    20772086static bool toscrubbedskyfileMode(pxConfig *config)
    20782087{
    2079      return change_skyfile_data_state(config, "scrubbed", "goto_scrubbed");
     2088     return change_skyfile_data_state(config, "scrubbed");
    20802089}
    20812090
     
    21012110    else {
    21022111      if (strcmp(state,"error_cleaned") == 0) {
    2103         change_skyfile_data_state(config,"error_cleaned","goto_cleaned");
     2112        change_skyfile_data_state(config,"error_cleaned");
    21042113      }
    21052114      else if (strcmp(state, "error_scrubbed") == 0) {
    2106         change_skyfile_data_state(config,"error_scrubbed","goto_scrubbed");
     2115        change_skyfile_data_state(config,"error_scrubbed");
    21072116      }
    21082117      else if (strcmp(state, "error_purged") == 0) {
    2109         change_skyfile_data_state(config,"error_purged","goto_purged");
     2118        change_skyfile_data_state(config,"error_purged");
    21102119      }
    21112120      else {
     
    25262535        psStringAppend(&query, " AND (warpSkyfile.skycell_id = '%s')", skycell_id);
    25272536    }
     2537    // we do not update components with the magic fault value. They are non-updateable
     2538    // (But can be recovered with "warptool -revertwarped -fault 26" (PXTOOL_DO_NOT_REVERT_FAULT)
     2539    psStringAppend(&query, " AND (warpSkyfile.fault != %d)", PXTOOL_DO_NOT_REVERT_FAULT);
    25282540
    25292541    if (!p_psDBRunQueryF(config->dbh, query, setHook, warp_id)) {
Note: See TracChangeset for help on using the changeset viewer.