Changeset 23381
- Timestamp:
- Mar 18, 2009, 10:10:16 AM (17 years ago)
- Location:
- trunk/ippTools
- Files:
-
- 4 edited
-
share/chiptool_completely_processed_exp.sql (modified) (1 diff)
-
src/chiptool.c (modified) (8 diffs)
-
src/chiptoolConfig.c (modified) (2 diffs)
-
src/pxchip.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/share/chiptool_completely_processed_exp.sql
r20608 r23381 11 11 dvodb, 12 12 tess_id, 13 end_stage 13 end_stage, 14 all_files_magicked as magicked 14 15 FROM 15 16 (SELECT 16 17 chipRun.*, 17 18 rawImfile.class_id as rawimfile_class_id, 18 chipProcessedImfile.class_id 19 chipProcessedImfile.class_id, 20 SUM(!chipProcessedImfile.magicked) = 0 as all_files_magicked 19 21 FROM chipRun 20 22 JOIN rawImfile -
trunk/ippTools/src/chiptool.c
r23339 r23381 209 209 return false; 210 210 } 211 211 // 212 212 // queue the exp 213 213 if (!pxchipQueueByExpTag(config, exp_id, workdir, label, reduction, expgroup, dvodb, tess_id, end_stage)) { … … 415 415 PXOPT_LOOKUP_F32(n_cr, config->args, "-n_cr", false, false); 416 416 PXOPT_LOOKUP_STR(path_base, config->args, "-path_base", false, false); 417 PXOPT_LOOKUP_BOOL(magicked, config->args, "-magicked", false); 417 418 418 419 // default values … … 490 491 path_base, 491 492 code, 492 0 // magic_ds_id493 magicked 493 494 )) { 494 495 // rollback … … 540 541 PXOPT_COPY_STR(config->args, where, "-reduction", "chipRun.reduction", "=="); 541 542 PXOPT_COPY_STR(config->args, where, "-label", "chipRun.label", "LIKE"); 543 PXOPT_COPY_S32(config->args, where, "-magicked", "chipRun.magicked", "=="); 542 544 543 545 psString query = pxDataGet("chiptool_processedimfile.sql"); … … 1137 1139 } 1138 1140 1139 // set chipRun.state to 'stop' 1140 if (!pxchipRunSetState(config, chipRun->chip_id, "full" )) {1141 // set chipRun.state to 'stop' and update the magicked state 1142 if (!pxchipRunSetState(config, chipRun->chip_id, "full", chipRun->magicked)) { 1141 1143 psError(PS_ERR_UNKNOWN, false, "failed to change chipRun.state for chip_id: %" PRId64, chipRun->chip_id); 1142 1144 psFree(chipRun); … … 1209 1211 } 1210 1212 1211 // note only updates if chipRun.state = run_state 1212 if (!p_psDBRunQueryF(config->dbh, query, data_state, chip_id, class_id, run_state)) { 1213 psString set_magic = ""; 1214 if (!strcmp(data_state, "full")) { 1215 // copy the magicked state from the input to the output when transitioning to full state 1216 set_magic = "\n , chipProcessedImfile.magicked = rawImfile.magicked"; 1217 } 1218 1219 if (!p_psDBRunQueryF(config->dbh, query, data_state, set_magic, chip_id, class_id)) { 1220 psFree(query); 1213 1221 psError(PS_ERR_UNKNOWN, false, "database error"); 1214 1222 // rollback … … 1227 1235 query = pxDataGet("chiptool_change_exp_state.sql"); 1228 1236 if (!p_psDBRunQueryF(config->dbh, query, data_state, chip_id, data_state)) { 1237 psFree(query); 1229 1238 // rollback 1230 1239 if (!psDBRollback(config->dbh)) { … … 1234 1243 return false; 1235 1244 } 1245 psFree(query); 1236 1246 1237 1247 if (!psDBCommit(config->dbh)) { -
trunk/ippTools/src/chiptoolConfig.c
r23339 r23381 147 147 psMetadataAddStr(addprocessedimfileArgs, PS_LIST_TAIL, "-path_base", 0, "define base output location", NULL); 148 148 psMetadataAddS16(addprocessedimfileArgs, PS_LIST_TAIL, "-code", 0, "set fault code", 0); 149 psMetadataAddBool(addprocessedimfileArgs, PS_LIST_TAIL, "-magicked", 0, "define magicked status", false); 149 150 150 151 // -processedimfile … … 155 156 psMetadataAddStr(processedimfileArgs, PS_LIST_TAIL, "-reduction", 0, "search by reduction class", NULL); 156 157 psMetadataAddStr(processedimfileArgs, PS_LIST_TAIL, "-label", 0, "search by chipRun label (LIKE comparison)", NULL); 158 psMetadataAddBool(processedimfileArgs, PS_LIST_TAIL, "-magicked", 0, "search by magicked status", false); 157 159 pxchipSetSearchArgs(processedimfileArgs); 158 160 psMetadataAddU64(processedimfileArgs, PS_LIST_TAIL, "-limit", 0, "limit result set to N items", 0); -
trunk/ippTools/src/pxchip.h
r19324 r23381 25 25 #include "pxtools.h" 26 26 27 bool pxchipRunSetState(pxConfig *config, psS64 chip_id, const char *state );27 bool pxchipRunSetState(pxConfig *config, psS64 chip_id, const char *state, const bool magicked); 28 28 bool pxchipRunSetStateByQuery(pxConfig *config, psMetadata *where, const char *state); 29 29 bool pxchipRunSetLabel(pxConfig *config, psS64 chip_id, const char *label);
Note:
See TracChangeset
for help on using the changeset viewer.
