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/difftool.c

    r30070 r30544  
    917917    PXOPT_COPY_S16(config->args, where, "-fault",     "fault", "==");
    918918
     919    PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false);
     920
    919921    if (!psListLength(where->list) && !psMetadataLookupBool(NULL, config->args, "-all")) {
    920922        psFree(where);
     
    950952        psLogMsg("difftool", PS_LOG_INFO, "Deleted %" PRIu64 " rows", psDBAffectedRows(config->dbh));
    951953
     954        if (!fault) {
     955            // If fault has not been supplied, don't revert update faults with the magic value
     956            // We don't do this for new runs because then they would never complete
     957            // quality should be used to drop bad components
     958            psStringAppend(&query_updated, " AND (diffSkyfile.fault != %d)", PXTOOL_DO_NOT_REVERT_FAULT);
     959        }
    952960        if (!p_psDBRunQuery(config->dbh, query_updated)) {
    953961            psError(PS_ERR_UNKNOWN, false, "database error");
     
    31983206        psStringAppend(&query, " AND (diffSkyfile.skycell_id = '%s')", skycell_id);
    31993207    }
     3208    // we do not update components with the magic fault value. They are non-updateable
     3209    // (But can be recovered with "difftool -revertwarped -fault 26" (PXTOOL_DO_NOT_REVERT_FAULT)
     3210    psStringAppend(&query, " AND (diffSkyfile.fault != %d)", PXTOOL_DO_NOT_REVERT_FAULT);
    32003211
    32013212    if (!p_psDBRunQueryF(config->dbh, query, setHook, diff_id)) {
Note: See TracChangeset for help on using the changeset viewer.