Changeset 34241 for branches/eam_branches/ipp-20120627/ippTools/src
- Timestamp:
- Jul 31, 2012, 11:38:18 AM (14 years ago)
- Location:
- branches/eam_branches/ipp-20120627/ippTools/src
- Files:
-
- 6 edited
-
. (modified) (1 prop)
-
disttool.c (modified) (2 diffs)
-
magictool.c (modified) (1 prop)
-
pxtools.c (modified) (4 diffs)
-
staticskytool.c (modified) (4 diffs)
-
staticskytoolConfig.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20120627/ippTools/src
- Property svn:mergeinfo changed
/trunk/ippTools/src merged: 34155,34166,34168,34170,34197,34235
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20120627/ippTools/src/disttool.c
r34081 r34241 743 743 744 744 query = "DELETE FROM distComponent where dist_id = %" PRId64; 745 char *query2 = "DELETE from rcDSFileset using distRun, rcDSFileset WHERE distRun.dist_id = rcDSFileset.dist_id AND rcDSFileset.state ='cleaned' AND dist_id = %" PRId64; 745 746 746 747 for (long i=0; i < psArrayLength(output); i++) { … … 753 754 } 754 755 756 // delete any existing distComponents 755 757 if (!p_psDBRunQueryF(config->dbh, query, dist_id)) { 758 psError(PS_ERR_UNKNOWN, false, "database error"); 759 psFree(query); 760 if (!psDBRollback(config->dbh)) { 761 psError(PS_ERR_UNKNOWN, false, "database error"); 762 } 763 return false; 764 } 765 // delete any exisiting fileset 766 if (!p_psDBRunQueryF(config->dbh, query2, dist_id)) { 756 767 psError(PS_ERR_UNKNOWN, false, "database error"); 757 768 psFree(query); -
branches/eam_branches/ipp-20120627/ippTools/src/magictool.c
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/eam_branches/ipp-20120627/ippTools/src/pxtools.c
r32565 r34241 301 301 PXOPT_LOOKUP_STR(note, config->args, "-set_note", false, false); 302 302 303 #ifdef DISALLOW_CHANGE_TO_UPDATE 304 // Back in the days of magic we didn't allow state changes of Run's 305 // to update because the interaction with destreaking was problematic 306 // With the death of magic we can allow this now. 303 307 if ((state)&&(!strcmp(state, "update"))) { 304 308 fprintf(stderr, "'-updaterun -set_state update' is not supported."); … … 310 314 exit(1); 311 315 } 312 316 #endif 313 317 psString dist_group = NULL; 314 318 if (has_dist_group) { … … 350 354 psString joinHook = psStringCopy(""); 351 355 psString fileWhere = NULL; 356 357 #ifdef DISALLOW_CHANGE_TO_UPDATE 352 358 if (state && !strcmp(state, "update")) { 353 359 psStringAppend(&joinHook, "\n JOIN %s USING(%s)", fileTable, idColumn); … … 355 361 psStringAppend(&fileWhere, "AND %s.data_state = 'cleaned'", fileTable); 356 362 } 363 #endif 357 364 358 365 psString whereClause = psDBGenerateWhereSQL(where, NULL); -
branches/eam_branches/ipp-20120627/ippTools/src/staticskytool.c
r34081 r34241 1144 1144 static bool updateskycalrunMode(pxConfig *config) 1145 1145 { 1146 #ifdef notyet1147 1146 PS_ASSERT_PTR_NON_NULL(config, false); 1148 1147 1149 1148 psMetadata *where = psMetadataAlloc(); 1150 PXOPT_COPY_S64(config->args, where, "-sky _id", "sky_id", "==");1149 PXOPT_COPY_S64(config->args, where, "-skycal_id", "skycal_id", "=="); 1151 1150 PXOPT_COPY_STR(config->args, where, "-label", "label", "=="); 1152 1151 PXOPT_COPY_STR(config->args, where, "-state", "state", "=="); … … 1157 1156 } 1158 1157 1159 psString query = psStringCopy("UPDATE s taticskyRun");1158 psString query = psStringCopy("UPDATE skycalRun"); 1160 1159 1161 1160 // pxUpdateRun gets parameters from config->args and updates 1162 bool result = pxUpdateRun(config, where, &query, "s taticskyRun", "sky_id", "staticskyResult", true, false);1161 bool result = pxUpdateRun(config, where, &query, "skycalRun", "skycal_id", "skycalResult", true, false); 1163 1162 psFree(query); 1164 1163 psFree(where); 1165 1164 1166 1165 return result; 1167 #endif 1168 return false; 1169 } 1166 } 1167 1170 1168 static bool pendingskycalrunMode(pxConfig *config) 1171 1169 { … … 1370 1368 PXOPT_COPY_S64(config->args, where, "-skycal_id", "skycalRun.skycal_id", "=="); 1371 1369 PXOPT_COPY_S64(config->args, where, "-sky_id", "skycalRun.sky_id", "=="); 1372 PXOPT_COPY_S64(config->args, where, "-stack_id", "s kycalRun.stack_id", "==");1370 PXOPT_COPY_S64(config->args, where, "-stack_id", "stackRun.stack_id", "=="); 1373 1371 PXOPT_COPY_STR(config->args, where, "-tess_id", "stackRun.tess_id", "LIKE"); 1374 1372 PXOPT_COPY_STR(config->args, where, "-skycell_id", "stackRun.skycell_id", "LIKE"); … … 1447 1445 1448 1446 psMetadata *where = psMetadataAlloc(); 1449 PXOPT_COPY_S64(config->args, where, "-skycal_id", "s taticskyResult.sky_id", "==");1450 pxAddLabelSearchArgs(config, where, "-label", "s taticskyRun.label", "==");1451 pxAddLabelSearchArgs(config, where, "-data_group", "s taticskyRun.data_group", "==");1447 PXOPT_COPY_S64(config->args, where, "-skycal_id", "skycalResult.skycal_id", "=="); 1448 pxAddLabelSearchArgs(config, where, "-label", "skycalRun.label", "=="); 1449 pxAddLabelSearchArgs(config, where, "-data_group", "skycalRun.data_group", "=="); 1452 1450 pxAddLabelSearchArgs(config, where, "-filter", "stackRun.filter", "=="); 1453 PXOPT_COPY_S16(config->args, where, "-fault", "s taticskyResult.fault", "==");1451 PXOPT_COPY_S16(config->args, where, "-fault", "skycalResult.fault", "=="); 1454 1452 1455 1453 if (!psListLength(where->list) && !psMetadataLookupBool(NULL, config->args, "-all")) { -
branches/eam_branches/ipp-20120627/ippTools/src/staticskytoolConfig.c
r33919 r34241 171 171 // -updateskycalrun 172 172 psMetadata *updateskycalrunArgs = psMetadataAlloc(); 173 psMetadataAddS64(updateskycalrunArgs, PS_LIST_TAIL, "-sky _id", 0, "search by stackID", 0);173 psMetadataAddS64(updateskycalrunArgs, PS_LIST_TAIL, "-skycal_id", 0, "search by skycal ID", 0); 174 174 psMetadataAddStr(updateskycalrunArgs, PS_LIST_TAIL, "-state", 0, "search by state", NULL); 175 175 psMetadataAddStr(updateskycalrunArgs, PS_LIST_TAIL, "-label", 0, "search by label", 0); … … 218 218 // -revertskycal 219 219 psMetadata *revertskycalArgs= psMetadataAlloc(); 220 psMetadataAddS64(revertskycalArgs, PS_LIST_TAIL, "-skycal_id", 0, "search by s taticskyID", 0);220 psMetadataAddS64(revertskycalArgs, PS_LIST_TAIL, "-skycal_id", 0, "search by skycal ID", 0); 221 221 psMetadataAddStr(revertskycalArgs, PS_LIST_TAIL, "-label", PS_META_DUPLICATE_OK, "search by label", 0); 222 222 psMetadataAddStr(revertskycalArgs, PS_LIST_TAIL, "-data_group", PS_META_DUPLICATE_OK, "search by data_group", 0);
Note:
See TracChangeset
for help on using the changeset viewer.
