Changeset 25870 for branches/eam_branches/20090820/ippTools/src/pxchip.c
- Timestamp:
- Oct 18, 2009, 10:23:28 AM (17 years ago)
- Location:
- branches/eam_branches/20090820
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ippTools/src/pxchip.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/20090820
-
branches/eam_branches/20090820/ippTools/src/pxchip.c
r24866 r25870 192 192 } 193 193 194 195 bool pxchipRunSetLabel(pxConfig *config, psS64 chip_id, const char *label) 194 bool pxchipProcessedImfileSetStateByQuery(pxConfig *config, psMetadata *where, const char *state) 196 195 { 197 196 PS_ASSERT_PTR_NON_NULL(config, false); 198 // note label == NULL should be explicitly allowed199 200 char *query = "UPDATE chipRun SET label = '%s' WHERE chip_id = %" PRId64;201 if (!p _psDBRunQueryF(config->dbh, query, label, chip_id)) {202 psError(PS_ERR_UNKNOWN, false, 203 "failed to change state for chip_id %" PRId64, chip_id);204 return false;205 } 206 207 return true; 208 } 209 210 211 bool pxchipRunSetLabelByQuery(pxConfig *config, psMetadata *where, const char *label) 212 { 213 PS_ASSERT_PTR_NON_NULL(config, false); 214 // note label == NULL should be explicitly allowed 215 216 psString query = psStringCopy("UPDATE chip Run JOIN rawExp USING(exp_id) SET label= '%s'");197 PS_ASSERT_PTR_NON_NULL(state, false); 198 199 // check that state is a valid string value 200 if (!pxIsValidState(state)) { 201 psError(PS_ERR_UNKNOWN, false, "invalid chipProcessedImfile state: %s", state); 202 return false; 203 } 204 205 /* if (!strcmp(state, "full")) { */ 206 /* // There are states that need to be met for a run to be set to full that we don't */ 207 /* // check here. */ 208 /* // for example all of the run's Imfiles must have chipProcessedImfile.data_state == "full" */ 209 /* // chipRun.magicked = (SUM(!chipProcessedImfile.magicked) = 0) */ 210 /* // so don't do allow setting the state to full */ 211 /* psError(PS_ERR_UNKNOWN, true, "cannot use -updaterun so set chipRun state to full"); */ 212 /* return false; */ 213 /* } */ 214 215 psString query = psStringCopy("UPDATE chipProcessedImfile JOIN chipRun USING(chip_id) JOIN rawExp ON chipRun.exp_id = rawExp.exp_id SET state = '%s'"); 217 216 218 217 if (where && psListLength(where->list) > 0) { … … 222 221 } 223 222 224 if (!p_psDBRunQueryF(config->dbh, query, label)) {223 if (!p_psDBRunQueryF(config->dbh, query, state)) { 225 224 psFree(query); 226 225 psError(PS_ERR_UNKNOWN, false, "database error"); … … 232 231 return true; 233 232 } 234 235 233 236 234 psS64 pxchipQueueByExpTag(pxConfig *config, … … 238 236 const char *workdir, 239 237 const char *label, 238 const char *data_group, 239 const char *dist_group, 240 240 const char *reduction, 241 241 const char *expgroup, 242 242 const char *dvodb, 243 243 const char *tess_id, 244 const char *end_stage) 244 const char *end_stage, 245 const char *note) 245 246 { 246 247 PS_ASSERT_PTR_NON_NULL(config, false); … … 260 261 "dirty", // workdir_state 261 262 label, 263 data_group, 264 dist_group, 262 265 reduction, 263 266 expgroup, … … 265 268 tess_id, 266 269 end_stage, 267 0 // magicked 270 0, // magicked 271 note 268 272 ) 269 273 ) {
Note:
See TracChangeset
for help on using the changeset viewer.
