Changeset 23389
- Timestamp:
- Mar 18, 2009, 10:18:37 AM (17 years ago)
- Location:
- trunk/ippTools
- Files:
-
- 17 edited
-
share/magicdstool_completed_runs.sql (modified) (4 diffs)
-
share/magicdstool_todestreak.sql (modified) (4 diffs)
-
share/magictool_addmask.sql (modified) (1 diff)
-
share/magictool_chipprocessedimfile.sql (modified) (1 diff)
-
share/magictool_diffskyfile.sql (modified) (1 diff)
-
share/magictool_inputskyfile.sql (modified) (1 diff)
-
share/magictool_mask.sql (modified) (1 diff)
-
share/magictool_rawimfile.sql (modified) (1 diff)
-
share/magictool_tomask.sql (modified) (1 diff)
-
share/magictool_toprocess_inputs.sql (modified) (1 diff)
-
share/magictool_toprocess_tree.sql (modified) (1 diff)
-
share/magictool_toskyfilemask.sql (modified) (1 diff)
-
share/magictool_totree.sql (modified) (1 diff)
-
share/magictool_warpskyfile.sql (modified) (1 diff)
-
src/magicdstool.c (modified) (6 diffs)
-
src/magicdstoolConfig.c (modified) (2 diffs)
-
src/magictool.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/share/magicdstool_completed_runs.sql
r20973 r23389 12 12 AND magicDSFile.component = rawImfile.class_id 13 13 WHERE 14 magicDSRun.state = ' run'14 magicDSRun.state = 'new' 15 15 AND magicDSRun.stage = 'raw' 16 16 GROUP BY … … 30 30 AND magicDSFile.component = chipProcessedImfile.class_id 31 31 WHERE 32 magicDSRun.state = ' run'32 magicDSRun.state = 'new' 33 33 AND magicDSRun.stage = 'chip' 34 34 GROUP BY … … 48 48 AND magicDSFile.component = warpSkyfile.skycell_id 49 49 WHERE 50 magicDSRun.state = ' run'50 magicDSRun.state = 'new' 51 51 AND magicDSRun.stage = 'warp' 52 52 AND warpSkyfile.fault = 0 … … 72 72 AND magicDSFile.component = diffSkyfile.skycell_id 73 73 WHERE 74 magicDSRun.state = ' run'74 magicDSRun.state = 'new' 75 75 AND magicDSRun.stage = 'diff' 76 76 AND diffSkyfile.fault = 0 -
trunk/ippTools/share/magicdstool_todestreak.sql
r20973 r23389 26 26 AND magicDSFile.component = rawImfile.class_id 27 27 WHERE 28 magicDSRun.state = ' run'28 magicDSRun.state = 'new' 29 29 AND magicDSRun.stage = 'raw' 30 30 AND magicDSFile.component IS NULL … … 57 57 AND magicDSFile.component = chipProcessedImfile.class_id 58 58 WHERE 59 magicDSRun.state = ' run'59 magicDSRun.state = 'new' 60 60 AND magicDSRun.stage = 'chip' 61 61 AND chipRun.state = 'full' … … 91 91 AND magicDSFile.component = warpSkyfile.skycell_id 92 92 WHERE 93 magicDSRun.state = ' run'93 magicDSRun.state = 'new' 94 94 AND magicDSRun.stage = 'warp' 95 95 AND warpRun.state = 'full' … … 127 127 AND magicDSFile.component = diffSkyfile.skycell_id 128 128 WHERE 129 magicDSRun.state = ' run'129 magicDSRun.state = 'new' 130 130 AND magicDSRun.stage = 'diff' 131 131 AND diffSkyfile.fault = 0 -
trunk/ippTools/share/magictool_addmask.sql
r18526 r23389 2 2 magicRun 3 3 SET 4 state = ' stop'4 state = 'full' 5 5 WHERE 6 state != ' stop'6 state != 'full' -
trunk/ippTools/share/magictool_chipprocessedimfile.sql
r20706 r23389 26 26 chipRun.state = 'full' 27 27 AND chipProcessedImfile.fault = 0 28 -- AND magicRun.state = ' stop'28 -- AND magicRun.state = 'full' 29 29 -- AND magicMask.fault = 0 -
trunk/ippTools/share/magictool_diffskyfile.sql
r20701 r23389 24 24 diffRun.state = 'full' 25 25 AND diffSkyfile.fault = 0 26 -- AND magicRun.state = ' stop'26 -- AND magicRun.state = 'full' 27 27 -- AND magicMask.fault = 0 -
trunk/ippTools/share/magictool_inputskyfile.sql
r20973 r23389 9 9 AND magicInputSkyfile.node = diffSkyfile.skycell_id 10 10 WHERE 11 magicRun.state = ' run'11 magicRun.state = 'new' -
trunk/ippTools/share/magictool_mask.sql
r20735 r23389 6 6 USING(magic_id) 7 7 WHERE 8 magicRun.state = ' stop'8 magicRun.state = 'full' 9 9 AND magicMask.fault = 0 -
trunk/ippTools/share/magictool_rawimfile.sql
r20706 r23389 24 24 WHERE 25 25 rawImfile.fault = 0 26 -- AND magicRun.state = ' stop'26 -- AND magicRun.state = 'full' 27 27 -- AND magicMask.fault = 0 -
trunk/ippTools/share/magictool_tomask.sql
r18781 r23389 10 10 LEFT JOIN magicNodeResult USING(magic_id, node) 11 11 WHERE 12 magicRun.state = ' run'12 magicRun.state = 'new' 13 13 AND magicNodeResult.node = 'root' 14 14 AND magicNodeResult.fault = 0 -
trunk/ippTools/share/magictool_toprocess_inputs.sql
r21004 r23389 19 19 AND magicTree.node = magicNodeResult.node 20 20 WHERE 21 magicRun.state = ' run'21 magicRun.state = 'new' 22 22 AND magicNodeResult.magic_id IS NULL 23 23 AND magicNodeResult.node IS NULL -
trunk/ippTools/share/magictool_toprocess_tree.sql
r21099 r23389 15 15 AND magicTree.node = magicNodeResult.node 16 16 WHERE 17 magicRun.state = ' run'17 magicRun.state = 'new' 18 18 -- where hook %s 19 19 ORDER BY -
trunk/ippTools/share/magictool_toskyfilemask.sql
r15348 r23389 7 7 USING(magic_id) 8 8 WHERE 9 magicRun.state = ' run'9 magicRun.state = 'new' 10 10 AND magicSkyfileMask.magic_id IS NULL -
trunk/ippTools/share/magictool_totree.sql
r20474 r23389 12 12 USING(magic_id) 13 13 WHERE 14 magicRun.state = ' run'14 magicRun.state = 'new' 15 15 AND magicTree.node IS NULL 16 16 AND magicRun.fault = 0 -
trunk/ippTools/share/magictool_warpskyfile.sql
r20701 r23389 21 21 warpRun.state = 'full' 22 22 AND warpSkyfile.fault = 0 23 -- AND magicRun.state = ' stop'23 -- AND magicRun.state = 'full' 24 24 -- AND magicMask.fault = 0 -
trunk/ippTools/src/magicdstool.c
r21433 r23389 242 242 243 243 // create a new magicRun for this group 244 magicRunRow *run = magicRunRowAlloc(0, exp_id, " run", workdir, "dirty", label, dvodb, registered, 0);244 magicRunRow *run = magicRunRowAlloc(0, exp_id, "new", workdir, "dirty", label, dvodb, registered, 0); 245 245 if (!run) { 246 246 psAbort("failed to alloc magicRun object"); … … 320 320 PXOPT_LOOKUP_STR(stage, config->args, "-stage", true, false); 321 321 PXOPT_LOOKUP_STR(outroot, config->args, "-outroot", true, false); 322 323 // optional 322 324 PXOPT_LOOKUP_STR(recoveryroot, config->args, "-recoveryroot", false, false); 323 325 PXOPT_LOOKUP_BOOL(re_place, config->args, "-replace", false); 324 326 PXOPT_LOOKUP_BOOL(remove, config->args, "-remove", false); 325 326 // optional327 327 PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false); 328 PXOPT_LOOKUP_STR(label, config->args, "-label", false, false); 328 329 329 330 psS64 stage_id = 0, cam_id = 0; … … 337 338 0, // ID 338 339 magic_id, 339 " run", // state340 "new", // state 340 341 stage, 341 342 stage_id, 342 343 cam_id, 344 label, 343 345 outroot, 344 346 recoveryroot, … … 396 398 PXOPT_COPY_S64(config->args, where, "-magic_ds_id", "magic_ds_id", "=="); 397 399 PXOPT_COPY_S64(config->args, where, "-magic_id", "magic_id", "=="); 398 // PXOPT_COPY_S64(config->args, where, "-exp_id", "exp_id", "==");400 PXOPT_COPY_STR(config->args, where, "-label", "label", "=="); 399 401 400 402 PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false); … … 685 687 psS64 magic_ds_id = psMetadataLookupS64(NULL, row, "magic_ds_id"); 686 688 687 // set magicDSRun.state to ' stop'688 if (!setmagicDSRunState(config, magic_ds_id, " stop")) {689 // set magicDSRun.state to 'full' 690 if (!setmagicDSRunState(config, magic_ds_id, "full")) { 689 691 psError(PS_ERR_UNKNOWN, false, "failed to change magicDSRun.state for magic_ds_id: %" PRId64, 690 692 magic_ds_id); … … 795 797 // check that state is a valid string value 796 798 if (!( 797 (strncmp(state, " run", 4) == 0)798 || (strncmp(state, " stop", 5) == 0)799 (strncmp(state, "new", 4) == 0) 800 || (strncmp(state, "full", 5) == 0) 799 801 ) 800 802 ) { -
trunk/ippTools/src/magicdstoolConfig.c
r21433 r23389 70 70 psMetadataAddBool(definerunArgs, PS_LIST_TAIL, "-replace", 0, "use the simple output format", false); 71 71 psMetadataAddBool(definerunArgs, PS_LIST_TAIL, "-remove", 0, "use the simple output format", false); 72 //psMetadataAddStr(definerunArgs, PS_LIST_TAIL, "-label", 0, "define label", NULL);72 psMetadataAddStr(definerunArgs, PS_LIST_TAIL, "-label", 0, "define label", NULL); 73 73 psMetadataAddBool(definerunArgs, PS_LIST_TAIL, "-simple", 0, "use the simple output format", false); 74 74 … … 88 88 psMetadataAddS64(todestreakArgs, PS_LIST_TAIL, "-magic_ds_id", 0, "search by magic Destreak ID", 0); 89 89 psMetadataAddS64(todestreakArgs, PS_LIST_TAIL, "-magic_id", 0, "search by magic ID", 0); 90 // psMetadataAddS64(todestreakArgs, PS_LIST_TAIL, "-exp_id", 0, "search by exposure ID", 0);90 psMetadataAddStr(todestreakArgs, PS_LIST_TAIL, "-label", 0, "define label", NULL); 91 91 psMetadataAddU64(todestreakArgs, PS_LIST_TAIL, "-limit", 0, "limit result set to N items", 0); 92 92 psMetadataAddBool(todestreakArgs, PS_LIST_TAIL, "-simple", 0, "use the simple output format", false); -
trunk/ippTools/src/magictool.c
r21402 r23389 217 217 218 218 // create a new magicRun for this group 219 magicRunRow *run = magicRunRowAlloc(0, exp_id, diff_id, " run", workdir, "dirty", label, dvodb, registered, 0);219 magicRunRow *run = magicRunRowAlloc(0, exp_id, diff_id, "new", workdir, "dirty", label, dvodb, registered, 0); 220 220 if (!run) { 221 221 psAbort("failed to alloc magicRun object"); … … 538 538 539 539 if (code > 0) { 540 char *query = "UPDATE magicRun SET fault = %d, state = ' stop' WHERE magic_id = %" PRId64;540 char *query = "UPDATE magicRun SET fault = %d, state = 'full' WHERE magic_id = %" PRId64; 541 541 if (!p_psDBRunQueryF(config->dbh, query, code, magic_id)) { 542 542 psError(PS_ERR_UNKNOWN, false, … … 1088 1088 } 1089 1089 1090 // Set to " run"1090 // Set to "new" 1091 1091 { 1092 1092 psString query = psStringCopy("UPDATE magicRun JOIN magicMask USING(magic_id) " 1093 "SET magicRun.state = ' run' WHERE magicMask.fault != 0");1093 "SET magicRun.state = 'new' WHERE magicMask.fault != 0"); 1094 1094 1095 1095 if (psListLength(where->list)) { … … 1481 1481 // check that state is a valid string value 1482 1482 if (!( 1483 (strncmp(state, " run", 4) == 0)1484 || (strncmp(state, " stop", 5) == 0)1483 (strncmp(state, "new", 4) == 0) 1484 || (strncmp(state, "full", 5) == 0) 1485 1485 || (strncmp(state, "reg", 4) == 0) 1486 1486 )
Note:
See TracChangeset
for help on using the changeset viewer.
