IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 32770


Ignore:
Timestamp:
Nov 22, 2011, 1:17:11 PM (14 years ago)
Author:
bills
Message:

fix sql to make -rerun work properly

File:
1 edited

Legend:

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

    r32764 r32770  
    178178    PXOPT_LOOKUP_S64(exp_id, config->args, "-exp_id", false, false);
    179179
    180     psMetadata *where = psMetadataAlloc();
    181     pxchipGetSearchArgs (config, where); // rawExp only
    182     pxAddLabelSearchArgs (config, where, "-label", "newExp.label", "LIKE"); // define using newExp label
    183 
    184     if (!psListLength(where->list)) {
    185         psFree(where);
    186         psError(PXTOOLS_ERR_CONFIG, false, "search parameters are required");
    187         return false;
    188     }
    189180
    190181    PXOPT_LOOKUP_STR(label, config->args, "-set_label", true, false);
     
    199190    PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false);
    200191
     192    psMetadata *where = psMetadataAlloc();
     193    pxchipGetSearchArgs (config, where); // rawExp only
     194    pxAddLabelSearchArgs (config, where, "-label", "newExp.label", "="); // define using newExp label
     195
     196    if (!psListLength(where->list)) {
     197        psFree(where);
     198        psError(PXTOOLS_ERR_CONFIG, false, "search parameters are required");
     199        return false;
     200    }
     201
    201202    // find the exp_id of all the exposures that we want to queue up.
    202203    psString query = pxDataGet("vptool_find_rawexp.sql");
     
    214215
    215216    if (!rerun) {
    216       psStringAppend(&query, "AND vp_id IS NULL");
     217      psStringAppend(&query, "\n  AND vp_id IS NULL\n  AND (vpRun.label = '%s' OR vpRun.label IS NULL)", label);
    217218    }
    218219   
Note: See TracChangeset for help on using the changeset viewer.