IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 34973 for trunk/ippTools/src


Ignore:
Timestamp:
Jan 18, 2013, 11:11:29 AM (14 years ago)
Author:
bills
Message:

Fix staticskytool -defineskycalrun so that new runs can be queued with different label
than existing runs. The join in the previous version was incorrect

File:
1 edited

Legend:

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

    r34815 r34973  
    10661066    psFree(whereMD);
    10671067
     1068    psString labelHook = psStringCopy("");
    10681069    if (!rerun) {
    10691070        if (label)  {
    1070             psStringAppend(&query, "\nAND (skycalRun.label IS NULL OR skycalRun.label = '%s')", label);
     1071            psStringAppend(&labelHook, "\nAND skycalRun.label = '%s'", label);
    10711072        }
    10721073        psStringAppend(&query, "\nAND skycal_id IS NULL");
    10731074    }
    10741075
    1075     if (!p_psDBRunQuery(config->dbh, query)) {
     1076
     1077    if (!p_psDBRunQueryF(config->dbh, query, labelHook)) {
    10761078        psError(PS_ERR_UNKNOWN, false, "database error");
     1079        psFree(labelHook);
    10771080        psFree(query);
    10781081        return false;
    10791082    }
     1083    psFree(labelHook);
    10801084    psFree(query);
    10811085
     
    13921396    PXOPT_COPY_STR(config->args, where, "-label",      "skycalRun.label", "==");
    13931397    PXOPT_COPY_STR(config->args, where, "-data_group", "skycalRun.data_group", "LIKE");
     1398    PXOPT_COPY_S16(config->args, where, "-quality",     "skycalResult.quality", "==");
    13941399    PXOPT_COPY_S16(config->args, where, "-fault",      "skycalResult.fault", "==");
     1400
     1401    if (!pxskycellAddWhere(config, where)) {
     1402        psError(PXTOOLS_ERR_CONFIG, false, "failed to add skycell search arguments");
     1403        return false;
     1404    }
    13951405
    13961406    PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false);
Note: See TracChangeset for help on using the changeset viewer.