Changeset 25835 for trunk/ippTools/src/camtool.c
- Timestamp:
- Oct 14, 2009, 11:06:18 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/camtool.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/camtool.c
r25330 r25835 121 121 PXOPT_LOOKUP_STR(workdir, config->args, "-set_workdir", false, false); 122 122 PXOPT_LOOKUP_STR(label, config->args, "-set_label", false, false); 123 PXOPT_LOOKUP_STR(data_group, config->args, "-set_data_group", false, false); 124 PXOPT_LOOKUP_STR(dist_group, config->args, "-set_dist_group", false, false); 123 125 PXOPT_LOOKUP_STR(reduction, config->args, "-set_reduction", false, false); 124 126 PXOPT_LOOKUP_STR(expgroup, config->args, "-set_expgroup", false, false); … … 126 128 PXOPT_LOOKUP_STR(tess_id, config->args, "-set_tess_id", false, false); 127 129 PXOPT_LOOKUP_STR(end_stage, config->args, "-set_end_stage", false, false); 130 PXOPT_LOOKUP_STR(note, config->args, "-set_note", false, false); 128 131 129 132 // find the exp_id of all the exposures that we want to queue up. … … 212 215 workdir ? workdir : row->workdir, 213 216 label ? label : row->label, 217 data_group ? data_group: row->data_group, 218 dist_group ? dist_group: row->dist_group, 214 219 reduction ? reduction : row->reduction, 215 220 expgroup ? expgroup : row->expgroup, 216 221 dvodb ? dvodb : row->dvodb, 217 222 tess_id ? tess_id : row->tess_id, 218 end_stage ? end_stage : row->end_stage 223 end_stage ? end_stage : row->end_stage, 224 note 219 225 )) { 220 226 if (!psDBRollback(config->dbh)) { … … 251 257 PXOPT_COPY_STR(config->args, where, "-reduction", "camRun.reduction", "=="); 252 258 253 if (!psListLength(where->list) 254 && !psMetadataLookupBool(NULL, config->args, "-all")) { 259 if (!psListLength(where->list)) { 255 260 psFree(where); 256 261 psError(PXTOOLS_ERR_DATA, false, "search parameters are required"); 257 262 return false; 258 263 } 259 260 PXOPT_LOOKUP_STR(state, config->args, "-set_state", false, false); 261 PXOPT_LOOKUP_STR(label, config->args, "-set_label", false, false); 262 263 if ((!state) && (!label)) { 264 psError(PXTOOLS_ERR_DATA, false, "parameters are required"); 265 psFree(where); 266 return false; 267 } 268 269 if (state) { 270 // set camRun.state to state 271 if (!pxcamRunSetStateByQuery(config, where, state)) { 272 psFree(where); 273 return false; 274 } 275 } 276 277 if (label) { 278 // set camRun.label to label 279 if (!pxcamRunSetLabelByQuery(config, where, label)) { 280 psFree(where); 281 return false; 282 } 283 } 284 264 psString query = psStringCopy("UPDATE camRun JOIN chipRun USING(chip_id) JOIN rawExp USING(exp_id)"); 265 266 // pxUpdateRun gets parameters from config->args and updates 267 bool result = pxUpdateRun(config, where, &query, true); 268 if (!result) { 269 psError(PXTOOLS_ERR_DATA, false, "pxUpdateRun failed"); 270 } 271 272 psFree(query); 285 273 psFree(where); 286 274 287 return true;275 return result; 288 276 } 289 277 … … 642 630 pendingRow->workdir, 643 631 pendingRow->label, 632 pendingRow->data_group, 633 pendingRow->dist_group, 644 634 pendingRow->reduction, 645 635 pendingRow->expgroup, 646 636 pendingRow->dvodb, 647 637 pendingRow->tess_id, 648 pendingRow->end_stage 638 pendingRow->end_stage, 639 NULL // note does not propagate 649 640 )) { 650 641 // rollback … … 656 647 return false; 657 648 } 658 659 /* if (!pxaddQueueByCamID(config, */660 /* pendingRow->cam_id, */661 /* pendingRow->workdir, */662 /* pendingRow->label, */663 /* pendingRow->reduction, */664 /* pendingRow->dvodb */665 /* )) { */666 /* // rollback */667 /* if (!psDBRollback(config->dbh)) { */668 /* psError(PS_ERR_UNKNOWN, false, "database error"); */669 /* } */670 /* psError(PS_ERR_UNKNOWN, false, "failed to queue new addRun"); */671 /* psFree(pendingRow); */672 /* return false; */673 /* } */674 649 675 650 psFree(pendingRow);
Note:
See TracChangeset
for help on using the changeset viewer.
