Changeset 23919 for trunk/ippTools/src/chiptool.c
- Timestamp:
- Apr 17, 2009, 4:40:53 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/chiptool.c (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/chiptool.c
r23873 r23919 125 125 psMetadata *where = psMetadataAlloc(); 126 126 pxchipGetSearchArgs (config, where); // rawExp only 127 PXOPT_COPY_STR(config->args, where, "-label", "rawExp.label", "LIKE");127 pxAddLabelSearchArgs (config, where, "-label", "newExp.label", "LIKE"); 128 128 129 129 // psListLength(where->list) is at least 1 because exp_type defaults to "object" … … 219 219 } 220 220 221 222 # define GET_VALUE(PTYPE,CTYPE,VALUE,NAME) \ 223 PTYPE VALUE; \ 224 { bool status; \ 225 VALUE = psMetadataLookup##CTYPE(&status, md, NAME); \ 226 if (!status) { \ 227 psError(PS_ERR_UNKNOWN, false, "failed to lookup value for %s", NAME); \ 228 psFree(output); \ 229 return false; \ 230 } } 231 221 232 // loop over our list of exp_ids 222 233 for (long i = 0; i < psArrayLength(output); i++) { 223 234 psMetadata *md = output->data[i]; 224 235 225 bool status; 226 psS64 exp_id = psMetadataLookupS64(&status, md, "exp_id"); 227 if (!status) { 228 psError(PS_ERR_UNKNOWN, false, "failed to lookup value for exp_id"); 236 rawExpRow *row = rawExpObjectFromMetadata(md); 237 if (!row) { 238 psError(PS_ERR_UNKNOWN, false, "failed to convert metadata into chipRun"); 229 239 psFree(output); 230 240 return false; 231 241 } 232 // 242 243 GET_VALUE (psS64, S64, exp_id, "exp_id"); 244 GET_VALUE (psString, Str, raw_workdir, "workdir"); 245 GET_VALUE (psString, Str, raw_label, "label"); 246 GET_VALUE (psString, Str, raw_reduction, "reduction"); 247 // GET_VALUE (psString, Str, raw_expgroup, "expgroup"); 248 GET_VALUE (psString, Str, raw_dvodb, "dvodb"); 249 GET_VALUE (psString, Str, raw_tess_id, "tess_id"); 250 GET_VALUE (psString, Str, raw_end_stage, "end_stage"); 251 252 if (!row->exp_id) { 253 psError(PS_ERR_UNKNOWN, false, "failed to find value for exp_id"); 254 psFree(output); 255 return false; 256 } 257 233 258 // queue the exp 234 if (!pxchipQueueByExpTag(config, exp_id, workdir, label, reduction, expgroup, dvodb, tess_id, end_stage)) { 259 if (!pxchipQueueByExpTag(config, 260 exp_id, 261 workdir ? workdir : raw_workdir, 262 label ? label : raw_label, 263 reduction ? reduction : raw_reduction, 264 // expgroup ? expgroup : raw_expgroup, 265 // XXX how does expgroup get defined? 266 expgroup, 267 dvodb ? dvodb : raw_dvodb, 268 tess_id ? tess_id : raw_tess_id, 269 end_stage ? end_stage : raw_end_stage 270 )) { 235 271 if (!psDBRollback(config->dbh)) { 236 272 psError(PS_ERR_UNKNOWN, false, "database error"); … … 260 296 pxchipGetSearchArgs (config, where); // rawExp, chipRun 261 297 PXOPT_COPY_S64(config->args, where, "-chip_id", "chipRun.chip_id", "=="); 298 // we only allow a single label to match (do not use pxAddLabelSearchArgs here) 262 299 PXOPT_COPY_STR(config->args, where, "-label", "chipRun.label", "=="); 263 300 PXOPT_COPY_STR(config->args, where, "-state", "chipRun.state", "=="); … … 312 349 pxchipGetSearchArgs (config, where); //chipRun, rawExp 313 350 PXOPT_COPY_S64(config->args, where, "-chip_id", "chipRun.chip_id", "=="); 314 PXOPT_COPY_STR(config->args, where, "-label", "chipRun.label", "==");351 pxAddLabelSearchArgs (config, where, "-label", "chipRun.label", "=="); 315 352 316 353 psString query = pxDataGet("chiptool_pendingimfile.sql"); … … 563 600 PXOPT_COPY_STR(config->args, where, "-class_id", "chipProcessedImfile.class_id", "=="); 564 601 PXOPT_COPY_STR(config->args, where, "-reduction", "chipRun.reduction", "=="); 565 PXOPT_COPY_STR(config->args, where, "-label", "chipRun.label", "LIKE");602 pxAddLabelSearchArgs (config, where, "-label", "chipRun.label", "LIKE"); 566 603 PXOPT_COPY_S32(config->args, where, "-magicked", "chipRun.magicked", "=="); 567 604 … … 639 676 PXOPT_COPY_S64(config->args, where, "-chip_id", "chipRun.chip_id", "=="); 640 677 PXOPT_COPY_STR(config->args, where, "-class_id", "chipProcessedImfile.class_id", "=="); 641 PXOPT_COPY_STR(config->args, where, "-label", "chipRun.label", "LIKE"); 678 // require a single label 679 PXOPT_COPY_STR(config->args, where, "-label", "chipRun.label", "=="); 642 680 PXOPT_COPY_STR(config->args, where, "-reduction", "chipRun.reduction", "=="); 643 681 PXOPT_COPY_S16(config->args, where, "-fault", "chipProcessedImfile.fault", "=="); … … 865 903 866 904 psMetadata *where = psMetadataAlloc(); 867 PXOPT_COPY_STR(config->args, where, "-label", "label", "==");905 pxAddLabelSearchArgs (config, where, "-label", "label", "=="); 868 906 869 907 psString query = pxDataGet("chiptool_pendingcleanuprun.sql"); … … 929 967 PXOPT_COPY_S64(config->args, where, "-chip_id", "chip_id", "=="); 930 968 } 931 PXOPT_COPY_STR(config->args, where, "-label", "label", "==");969 pxAddLabelSearchArgs (config, where, "-label", "label", "=="); 932 970 933 971 psString query = pxDataGet("chiptool_pendingcleanupimfile.sql"); … … 1057 1095 1058 1096 psMetadata *where = psMetadataAlloc(); 1059 PXOPT_COPY_STR(config->args, where, "-label", "label", "==");1097 pxAddLabelSearchArgs (config, where, "-label", "label", "=="); 1060 1098 PXOPT_COPY_STR(config->args, where, "-state", "state", "=="); 1061 1099 … … 1118 1156 1119 1157 psMetadata *where = psMetadataAlloc(); 1120 PXOPT_COPY_STR(config->args, where, "-label", "label", "==");1158 pxAddLabelSearchArgs (config, where, "-label", "label", "=="); 1121 1159 1122 1160 // look for completed chipPendingExp
Note:
See TracChangeset
for help on using the changeset viewer.
