IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 14, 2009, 11:06:18 AM (17 years ago)
Author:
bills
Message:

Add data_group, dist_group, and note to the pipeline. These new columns will be used
for some of the tasks that label was used previously.

File:
1 edited

Legend:

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

    r25800 r25835  
    192192}
    193193
    194 bool pxchipRunSetLabel(pxConfig *config, psS64 chip_id, const char *label)
    195 {
    196     PS_ASSERT_PTR_NON_NULL(config, false);
    197     // note label == NULL should be explicitly allowed
    198 
    199     char *query = "UPDATE chipRun SET label = '%s' WHERE chip_id = %" PRId64;
    200     if (!p_psDBRunQueryF(config->dbh, query, label, chip_id)) {
    201         psError(PS_ERR_UNKNOWN, false,
    202                 "failed to change state for chip_id %" PRId64, chip_id);
    203         return false;
    204     }
    205 
    206     return true;
    207 }
    208 
    209 
    210 bool pxchipRunSetLabelByQuery(pxConfig *config, psMetadata *where, const char *label)
    211 {
    212     PS_ASSERT_PTR_NON_NULL(config, false);
    213     // note label == NULL should be explicitly allowed
    214 
    215     psString query = psStringCopy("UPDATE chipRun JOIN rawExp USING(exp_id) SET label = '%s'");
    216 
    217     if (where && psListLength(where->list) > 0) {
    218         psString whereClause = psDBGenerateWhereSQL(where, NULL);
    219         psStringAppend(&query, " %s", whereClause);
    220         psFree(whereClause);
    221     }
    222 
    223     if (!p_psDBRunQueryF(config->dbh, query, label)) {
    224         psFree(query);
    225         psError(PS_ERR_UNKNOWN, false, "database error");
    226         return false;
    227     }
    228 
    229     psFree(query);
    230 
    231     return true;
    232 }
    233 
    234194bool pxchipProcessedImfileSetStateByQuery(pxConfig *config, psMetadata *where, const char *state)
    235195{
     
    276236                         const char *workdir,
    277237                         const char *label,
     238                         const char *data_group,
     239                         const char *dist_group,
    278240                         const char *reduction,
    279241                         const char *expgroup,
    280242                         const char *dvodb,
    281243                         const char *tess_id,
    282                          const char *end_stage)
     244                         const char *end_stage,
     245                         const char *note)
    283246{
    284247    PS_ASSERT_PTR_NON_NULL(config, false);
     
    298261            "dirty",    // workdir_state
    299262            label,
     263            data_group,
     264            dist_group,
    300265            reduction,
    301266            expgroup,
     
    303268            tess_id,
    304269            end_stage,
    305             0           // magicked
     270            0,          // magicked
     271            note
    306272            )
    307273    ) {
Note: See TracChangeset for help on using the changeset viewer.