Changeset 28319
- Timestamp:
- Jun 14, 2010, 5:02:11 PM (16 years ago)
- Location:
- trunk/ippTools
- Files:
-
- 4 edited
-
share/pubtool_definerun.sql (modified) (4 diffs)
-
share/pubtool_pending.sql (modified) (2 diffs)
-
src/pubtool.c (modified) (3 diffs)
-
src/pubtoolConfig.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/share/pubtool_definerun.sql
r27041 r28319 6 6 FROM ( 7 7 -- Get diffs to publish 8 SELECT 8 SELECT DISTINCT 9 9 client_id, 10 10 diff_id AS stage_id, … … 12 12 FROM publishClient 13 13 JOIN diffRun 14 JOIN diffInputSkyfile USING(diff_id) 15 JOIN warpRun ON warpRun.warp_id = diffInputSkyfile.warp1 -- Only JOINing input, not reference! 16 JOIN fakeRun USING(fake_id) 17 JOIN camRun USING(cam_id) 18 JOIN chipRun USING(chip_id) 19 JOIN rawExp USING(exp_id) 14 20 WHERE publishClient.stage = 'diff' 15 21 AND publishClient.active = 1 16 AND diffRun.state = 'full'22 AND diffRun.state IN ('full', 'cleaned', 'goto_cleaned') 17 23 AND (diffRun.magicked > 0 OR diffRun.diff_mode = 4 OR publishClient.magicked = 0) 18 24 -- WHERE hook %s … … 25 31 FROM publishClient 26 32 JOIN camRun 33 JOIN chipRun USING(chip_id) 34 JOIN rawExp USING(exp_id) 27 35 WHERE publishClient.stage = 'camera' 28 36 AND publishClient.active = 1 29 AND camRun.state = 'full'37 AND camRun.state IN ('full', 'cleaned', 'goto_cleaned') 30 38 AND (camRun.magicked > 0 OR publishClient.magicked = 0) 31 39 -- WHERE hook %s … … 33 41 -- Only get stuff that hasn't been published 34 42 LEFT JOIN publishRun USING(client_id, stage_id) 35 WHERE publishRun.client_id IS NULL -
trunk/ippTools/share/pubtool_pending.sql
r27052 r28319 26 26 AND publishClient.active = 1 27 27 AND publishRun.state = 'new' 28 AND diffRun.state = 'full'28 AND diffRun.state IN ('full', 'cleaned', 'goto_cleaned') 29 29 AND (diffRun.magicked > 0 OR diffRun.diff_mode = 4 OR publishClient.magicked = 0) 30 30 -- WHERE hook %s … … 47 47 AND publishClient.active = 1 48 48 AND publishRun.state ='new' 49 AND camRun.state = 'full'49 AND camRun.state IN ('full', 'cleaned', 'goto_cleaned') 50 50 AND (camRun.magicked > 0 OR publishClient.magicked = 0) 51 51 -- WHERE hook %s -
trunk/ippTools/src/pubtool.c
r27071 r28319 157 157 // optional 158 158 PXOPT_COPY_S64(config->args, where, "-client_id", "client_id", "=="); 159 pxAddLabelSearchArgs(config, where, "-label", "label", "=="); // define using newExp label 159 pxAddLabelSearchArgs(config, where, "-label", "label", "=="); 160 pxAddLabelSearchArgs(config, where, "-data_group", "data_group", "=="); 161 PXOPT_COPY_TIME(config->args, where, "-dateobs_begin", "rawExp.dateobs", ">="); 162 PXOPT_COPY_TIME(config->args, where, "-dateobs_end", "rawExp.dateobs", "<="); 163 PXOPT_COPY_STR(config->args, where, "-filter", "rawExp.filter", "LIKE"); 164 PXOPT_COPY_STR(config->args, where, "-obs_mode", "rawExp.obs_mode", "LIKE"); 165 166 PXOPT_LOOKUP_BOOL(rerun, config->args, "-rerun", false); 160 167 161 168 psString query = pxDataGet("pubtool_definerun.sql"); // Query to run … … 164 171 psFree(where); 165 172 return false; 173 } 174 175 if (!rerun) { 176 psStringAppend(&query, "WHERE publishRun.client_id IS NULL"); 166 177 } 167 178 … … 241 252 PXOPT_COPY_STR(config->args, where, "-stage", "publishClient.stage", "=="); 242 253 PXOPT_COPY_STR(config->args, where, "-comment", "publishClient.comment", "LIKE"); 243 PXOPT_COPY_STR(config->args, where, "-label", "publishRun.label", "==");254 pxAddLabelSearchArgs(config, where, "-label", "label", "=="); 244 255 245 256 // optional -
trunk/ippTools/src/pubtoolConfig.c
r27311 r28319 64 64 psMetadataAddS64(definerunArgs, PS_LIST_TAIL, "-client_id", 0, "search by client_id", 0); 65 65 psMetadataAddStr(definerunArgs, PS_LIST_TAIL, "-label", PS_META_DUPLICATE_OK, "set and search by label", NULL); 66 psMetadataAddStr(definerunArgs, PS_LIST_TAIL, "-data_group", PS_META_DUPLICATE_OK, "search by data_group", NULL); 67 psMetadataAddBool(definerunArgs, PS_LIST_TAIL, "-rerun", 0, "Re-run publish?", false); 68 psMetadataAddTime(definerunArgs, PS_LIST_TAIL, "-dateobs_begin", 0, "search for exposures by time (>=)", NULL); 69 psMetadataAddTime(definerunArgs, PS_LIST_TAIL, "-dateobs_end", 0, "search for exposures by time (<=)", NULL); 70 psMetadataAddStr(definerunArgs, PS_LIST_TAIL, "-filter", 0, "search for filter", NULL); 71 psMetadataAddStr(definerunArgs, PS_LIST_TAIL, "-obs_mode", 0, "search by observation mode", NULL); 72 66 73 67 74 // -pending … … 70 77 psMetadataAddStr(pendingArgs, PS_LIST_TAIL, "-stage", 0, "search on source", NULL); 71 78 psMetadataAddStr(pendingArgs, PS_LIST_TAIL, "-comment", 0, "search on comment (LIKE)", NULL); 72 psMetadataAddStr(pendingArgs, PS_LIST_TAIL, "-label", 0, "search on label", NULL);79 psMetadataAddStr(pendingArgs, PS_LIST_TAIL, "-label", PS_META_DUPLICATE_OK, "search on label", NULL); 73 80 psMetadataAddBool(pendingArgs, PS_LIST_TAIL, "-simple", 0, "use simple output format?", false); 74 81 psMetadataAddU64(pendingArgs, PS_LIST_TAIL, "-limit", 0, "limit result set", 0);
Note:
See TracChangeset
for help on using the changeset viewer.
