IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 9, 2013, 2:53:54 PM (13 years ago)
Author:
bills
Message:

Change implementation of chiptool -definebyquery require label to be specified.
If -unique to queue new runs if one does not exist for the given label.
Previously it would not queue one if there was a run for the exposure
in any label.

File:
1 edited

Legend:

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

    r34766 r35572  
    269269
    270270    PXOPT_LOOKUP_STR(workdir, config->args, "-set_workdir", true, false);
    271     PXOPT_LOOKUP_STR(label, config->args, "-set_label", false, false);
     271    PXOPT_LOOKUP_STR(label, config->args, "-set_label", true, false);
    272272    PXOPT_LOOKUP_STR(reduction, config->args, "-set_reduction", false, false);
    273273    PXOPT_LOOKUP_STR(expgroup, config->args, "-set_expgroup", false, false);
     
    298298    psFree(where);
    299299
     300    psString labelHook = NULL;
    300301    if (unique) {
    301       psStringAppend(&query, "AND chip_id IS NULL");
     302      psStringAppend(&labelHook, "\nAND chipRun.label = '%s'", label);
     303      psStringAppend(&query, " AND chip_id IS NULL");
    302304    }
    303305   
    304     if (!p_psDBRunQuery(config->dbh, query)) {
     306    if (!p_psDBRunQueryF(config->dbh, query, labelHook ? labelHook : "")) {
    305307        psError(PS_ERR_UNKNOWN, false, "database error");
    306308        psFree(query);
Note: See TracChangeset for help on using the changeset viewer.