Changeset 24882
- Timestamp:
- Jul 21, 2009, 12:57:48 PM (17 years ago)
- Location:
- trunk/ippTools
- Files:
-
- 5 added
- 5 edited
-
share/Makefile.am (modified) (1 diff)
-
share/magicdstool_definebyquery_camera.sql (added)
-
share/magicdstool_definebyquery_chip.sql (added)
-
share/magicdstool_definebyquery_diff.sql (added)
-
share/magicdstool_definebyquery_raw.sql (added)
-
share/magicdstool_definebyquery_warp.sql (added)
-
share/magicdstool_getrunids.sql (modified) (1 diff)
-
share/magicdstool_torevert_diff.sql (modified) (1 diff)
-
src/magicdstool.c (modified) (11 diffs)
-
src/magicdstoolConfig.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/share/Makefile.am
r24689 r24882 154 154 magictool_revertnode.sql \ 155 155 magicdstool_completed_runs.sql \ 156 magicdstool_definebyquery_raw.sql \ 157 magicdstool_definebyquery_chip.sql \ 158 magicdstool_definebyquery_camera.sql \ 159 magicdstool_definebyquery_warp.sql \ 160 magicdstool_definebyquery_diff.sql \ 156 161 magicdstool_getrunids.sql \ 157 162 magicdstool_getskycells.sql \ -
trunk/ippTools/share/magicdstool_getrunids.sql
r24226 r24882 5 5 chip_id, 6 6 cam_id, 7 warp_id 7 warp_id, 8 diffSkyfile.diff_id 8 9 FROM magicRun 9 10 JOIN magicInputSkyfile USING(magic_id) -
trunk/ippTools/share/magicdstool_torevert_diff.sql
r24689 r24882 9 9 outroot, 10 10 diffSkyfile.path_base, 11 NULLAS cam_path_base,11 "NULL" AS cam_path_base, 12 12 0 AS bytes, 13 13 0 AS md5sum -
trunk/ippTools/src/magicdstool.c
r24709 r24882 2 2 * magicdstool.c 3 3 * 4 * Copyright (C) 2006-200 7IfA4 * Copyright (C) 2006-2009 IfA 5 5 * 6 6 * This program is free software; you can redistribute it and/or modify it … … 27 27 #include <math.h> 28 28 #include <ippdb.h> 29 #include <ippStages.h> 29 30 30 31 #include "pxtools.h" … … 97 98 static bool definebyqueryMode(pxConfig *config) 98 99 { 99 PS_ASSERT_PTR_NON_NULL(config, false);100 psError(PS_ERR_UNKNOWN, true, "definebyquery not implelmented yet");101 102 return false;103 #ifdef notyet104 100 105 101 // Required 102 PXOPT_LOOKUP_STR(stage, config->args, "-stage", true, false); 103 104 // Optional 106 105 PXOPT_LOOKUP_STR(workdir, config->args, "-workdir", false, false); 107 108 // Optional109 PXOPT_LOOKUP_STR( label, config->args, "-label", false, false);110 PXOPT_LOOKUP_ STR(dvodb, config->args, "-dvodb", false, false);111 PXOPT_LOOKUP_ TIME(registered, config->args, "-registered", false, false);106 PXOPT_LOOKUP_STR(recoveryroot, config->args, "-recoveryroot", false, false); 107 PXOPT_LOOKUP_BOOL(re_place, config->args, "-replace", false); 108 PXOPT_LOOKUP_STR(set_label, config->args, "-set_label", false, false); 109 PXOPT_LOOKUP_BOOL(rerun, config->args, "-rerun", false); 110 PXOPT_LOOKUP_BOOL(dry_run, config->args, "-dry_run", false); 112 111 PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false); 113 114 // Create temporary table of the best diffs 115 { 116 psString query = pxDataGet("magictool_definebyquery_temp_create.sql"); 117 if (!query) { 118 psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement"); 119 return false; 120 } 121 122 if (!p_psDBRunQuery(config->dbh, query)) { 123 psError(PS_ERR_UNKNOWN, false, "database error"); 124 return false; 125 } 112 PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false); 113 114 // search args 115 psMetadata *where = psMetadataAlloc(); 116 PXOPT_COPY_S64(config->args, where, "-exp_id", "exp_id", "=="); 117 PXOPT_COPY_S64(config->args, where, "-chip_id", "chip_id", "=="); 118 PXOPT_COPY_S64(config->args, where, "-cam_id", "cam_id", "=="); 119 PXOPT_COPY_S64(config->args, where, "-warp_id", "warp_id", "=="); 120 PXOPT_COPY_S64(config->args, where, "-diff_id", "diff_id", "=="); 121 PXOPT_COPY_S64(config->args, where, "-magic_id","magic_id", "=="); 122 123 pxAddLabelSearchArgs (config, where, "-label", "magicRun.label", "=="); 124 125 ippStage stageNum = ippStringToStage(stage); 126 127 psString query = NULL; 128 switch (stageNum) { 129 case IPP_STAGE_RAW: 130 query = pxDataGet("magicdstool_definebyquery_raw.sql"); 131 break; 132 case IPP_STAGE_CHIP: 133 query = pxDataGet("magicdstool_definebyquery_chip.sql"); 134 break; 135 case IPP_STAGE_CAMERA: 136 query = pxDataGet("magicdstool_definebyquery_camera.sql"); 137 break; 138 case IPP_STAGE_WARP: 139 query = pxDataGet("magicdstool_definebyquery_warp.sql"); 140 break; 141 case IPP_STAGE_DIFF: 142 query = pxDataGet("magicdstool_definebyquery_diff.sql"); 143 break; 144 case IPP_STAGE_FAKE: 145 case IPP_STAGE_STACK: 146 psError(PXTOOLS_ERR_DATA, true, "%sRuns do not need to be destreaked", stage); 147 return false; 148 case IPP_STAGE_NONE: 149 psError(PXTOOLS_ERR_DATA, true, "%s is not a valid stage", stage); 150 return false; 151 default: 152 psError(PXTOOLS_ERR_PROG, true, "ippStageToString returned %d for invalid stage %s", 153 stageNum, stage); 154 return false; 155 } 156 157 if (!query) { 158 psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement"); 159 return false; 160 } 161 162 if (psListLength(where->list)) { 163 psString whereClause = psDBGenerateWhereConditionSQL(where, NULL); 164 psStringAppend(&query, "\n AND %s", whereClause); 165 psFree(whereClause); 166 } 167 psFree(where); 168 169 dry_run = true; 170 171 // treat limit == 0 as "no limit" 172 if (limit) { 173 psString limitString = psDBGenerateLimitSQL(limit); 174 psStringAppend(&query, " %s", limitString); 175 psFree(limitString); 176 } 177 178 if (!p_psDBRunQueryF(config->dbh, query, rerun ? "\n1 " : "\n0 ")) { 179 psError(PS_ERR_UNKNOWN, false, "database error"); 126 180 psFree(query); 127 } 128 129 // Insert list of best diffs into temporary table 130 { 131 psString query = pxDataGet("magictool_definebyquery_temp_insert.sql"); 132 if (!query) { 133 psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement"); 134 return false; 135 } 136 137 psMetadata *where = psMetadataAlloc(); 138 PXOPT_COPY_S64(config->args, where, "-exp_id", "exp_id", "=="); 139 PXOPT_COPY_STR(config->args, where, "-diff_label", "diffRun.label", "=="); 140 PXOPT_COPY_F32(config->args, where, "-good_frac", "warpSkyfile.good_frac", ">="); 141 142 psString whereClause = NULL; // WHERE conditions 143 if (psListLength(where->list)) { 144 whereClause = psDBGenerateWhereConditionSQL(where, NULL); 145 psStringPrepend(&whereClause, "\n AND "); 146 } 147 psFree(where); 148 149 if (!p_psDBRunQueryF(config->dbh, query, whereClause)) { 150 psError(PS_ERR_UNKNOWN, false, "database error"); 151 psFree(whereClause); 152 psFree(query); 153 return false; 154 } 155 psFree(whereClause); 156 psFree(query); 157 } 158 159 // Get list of exposures ready to magic 160 { 161 psString query = pxDataGet("magictool_definebyquery_select.sql"); 162 if (!query) { 163 psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement"); 164 return false; 165 } 166 167 psString magicSkyCellNumsWhere = NULL; // WHERE conditions for magicSkyCellNums 168 { 169 psMetadata *where = psMetadataAlloc(); 170 PXOPT_COPY_S64(config->args, where, "-exp_id", "exp_id", "=="); 171 PXOPT_COPY_STR(config->args, where, "-diff_label", "diffRun.label", "=="); 172 PXOPT_COPY_F32(config->args, where, "-good_frac", "warpSkyfile.good_frac", ">="); 173 174 if (psListLength(where->list)) { 175 magicSkyCellNumsWhere = psDBGenerateWhereConditionSQL(where, NULL); 176 psStringPrepend(&magicSkyCellNumsWhere, "\n AND "); 177 } 178 psFree(where); 179 } 180 181 // "available" means only concern ourselves with exposures that have all diffs completed, unless we're 182 // told to only take what's available. 183 // "new" means we want a new run even if there's already a magic run defined 184 PXOPT_LOOKUP_BOOL(available, config->args, "-available", false); 185 PXOPT_LOOKUP_BOOL(new, config->args, "-new", false); 186 187 psString queryWhere = NULL; // WHERE conditions for entire query 188 if (available) { 189 psStringAppend(&queryWhere, " WHERE num_done = num_todo"); 190 } 191 if (new) { 192 const char *newWhere = " magic_id IS NULL"; // String to add 193 if (queryWhere) { 194 psStringAppend(&queryWhere, " AND %s", newWhere); 195 } else { 196 psStringAppend(&queryWhere, " WHERE %s", newWhere); 197 } 198 } 199 if (queryWhere) { 200 psStringAppend(&query, " %s", queryWhere); 201 psFree(queryWhere); 202 } 203 204 205 if (!p_psDBRunQueryF(config->dbh, query, magicSkyCellNumsWhere ? magicSkyCellNumsWhere : "")) { 206 psError(PS_ERR_UNKNOWN, false, "database error"); 207 psFree(magicSkyCellNumsWhere); 208 psFree(query); 209 return false; 210 } 211 psFree(magicSkyCellNumsWhere); 212 psFree(query); 213 } 181 return false; 182 } 183 psFree(query); 214 184 215 185 psArray *output = p_psDBFetchResult(config->dbh); … … 233 203 } 234 204 235 // Parse the list of exposures ready to magic 236 237 if (!psDBTransaction(config->dbh)) { 238 psError(PS_ERR_UNKNOWN, false, "database error"); 239 return false; 240 } 241 242 psString insert = pxDataGet("magictool_definebyquery_insert.sql"); // Insert query 205 // Parse the list of runs ready to be destreaked 206 207 if (!dry_run && !psDBTransaction(config->dbh)) { 208 psError(PS_ERR_UNKNOWN, false, "database error"); 209 return false; 210 } 243 211 244 212 psArray *list = psArrayAllocEmpty(16); // List of runs, to print 245 213 for (long i = 0; i < psArrayLength(output); i++) { 246 214 psMetadata *row = output->data[i]; // Row of interest 247 psS64 exp_id = psMetadataLookupS64(NULL, row, "exp_id"); // Exposure identifier 215 psS64 stage_id = psMetadataLookupS64(NULL, row, "stage_id"); 216 psS64 exp_id = psMetadataLookupS64(NULL, row, "exp_id"); 217 psS64 magic_id = psMetadataLookupS64(NULL, row, "magic_id"); 218 psS64 cam_id = psMetadataLookupS64(NULL, row, "cam_id"); 219 psString magicRunLabel = psMetadataLookupStr(NULL, row, "label"); 220 psString magicRunWorkdir = psMetadataLookupStr(NULL, row, "workdir"); 221 222 // if workdir is not supplied use the magicRun's 223 if (!workdir) { 224 workdir = magicRunWorkdir; 225 } 226 227 psString outroot = NULL; 228 // set outroot to workdir/exp_id/stage for example /somewhere/424242/chip 229 psStringAppend(&outroot, "%s/%" PRId64 "/%s", workdir, exp_id, stage); 248 230 249 231 // create a new magicRun for this group 250 magicRunRow *run = magicRunRowAlloc(0, exp_id, "new", workdir, "dirty", label, dvodb, registered, 0); 232 magicDSRunRow *run = magicDSRunRowAlloc( 233 0, // magic_ds_id 234 magic_id, 235 "new", 236 stage, 237 stage_id, 238 cam_id, 239 set_label ? set_label : magicRunLabel, 240 outroot, 241 recoveryroot, 242 re_place, 243 0); // remove 244 245 psFree(outroot); 251 246 if (!run) { 252 psAbort("failed to alloc magicRun object"); 253 } 254 255 if (!magicRunInsertObject(config->dbh, run)) { 256 psError(PS_ERR_UNKNOWN, false, "database error"); 257 psFree(run); 258 psFree(insert); 259 psFree(output); 260 psFree(list); 261 if (!psDBRollback(config->dbh)) { 247 psAbort("failed to alloc magicDSRun object"); 248 } 249 250 if (!dry_run) { 251 if (!magicDSRunInsertObject(config->dbh, run)) { 262 252 psError(PS_ERR_UNKNOWN, false, "database error"); 253 psFree(run); 254 psFree(output); 255 psFree(list); 256 if (!psDBRollback(config->dbh)) { 257 psError(PS_ERR_UNKNOWN, false, "database error"); 258 } 259 return false; 260 psS64 magic_ds_id = psDBLastInsertID(config->dbh); // Assigned identifier 261 run->magic_ds_id = magic_ds_id; 263 262 } 264 return false; 265 } 266 267 psS64 magic_id = psDBLastInsertID(config->dbh); // Assigned identifier 268 run->magic_id = magic_id; 263 } 269 264 270 265 psArrayAdd(list, list->n, run); 271 266 psFree(run); 272 273 // Create a suitable insertion query for this run 274 psString thisInsert = psStringCopy(insert); 275 { 276 psString idString = NULL; 277 psStringAppend(&idString, "%" PRId64, magic_id); 278 psStringSubstitute(&thisInsert, idString, "@MAGIC_ID@"); 279 psFree(idString); 280 } 281 { 282 psString idString = NULL; 283 psStringAppend(&idString, "%" PRId64, exp_id); 284 psStringSubstitute(&thisInsert, idString, "@EXP_ID@"); 285 psFree(idString); 286 } 287 288 if (!p_psDBRunQueryF(config->dbh, thisInsert, magic_id, exp_id)) { 289 psError(PS_ERR_UNKNOWN, false, "database error"); 290 psFree(thisInsert); 291 psFree(insert); 292 psFree(output); 293 psFree(list); 294 if (!psDBRollback(config->dbh)) { 295 psError(PS_ERR_UNKNOWN, false, "database error"); 296 } 297 return false; 298 } 299 psFree(thisInsert); 300 } 301 302 if (!psDBCommit(config->dbh)) { 267 } 268 269 if (!dry_run && !psDBCommit(config->dbh)) { 303 270 psError(PS_ERR_UNKNOWN, false, "database error"); 304 271 return false; … … 306 273 psFree(output); 307 274 308 if (!magic RunPrintObjects(stdout, list, !simple)) {275 if (!magicDSRunPrintObjects(stdout, list, !simple)) { 309 276 psError(PS_ERR_UNKNOWN, false, "failed to print object"); 310 277 psFree(list); … … 315 282 316 283 return true; 317 #endif // notyet318 284 } 319 285 … … 405 371 PXOPT_COPY_S64(config->args, where, "-magic_id", "magic_id", "=="); 406 372 pxAddLabelSearchArgs (config, where, "-label", "label", "=="); 373 PXOPT_COPY_STR(config->args, where, "-stage", "stage", "=="); 407 374 408 375 PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false); … … 501 468 psMetadata *row = output->data[0]; 502 469 503 psString stage = psMetadataLookupStr(NULL, row, "stage");470 psString stage= psMetadataLookupStr(NULL, row, "stage"); 504 471 psS64 stage_id = psMetadataLookupS64(NULL, row, "stage_id"); 505 472 506 if (!strcmp(stage, "camera")) { 507 // no there is no magicked column in camProcessedExp 473 ippStage stageNum = ippStringToStage(stage); 474 475 // chose the appropriate query based on the stage 476 switch (stageNum) { 477 case IPP_STAGE_RAW: 478 query = "UPDATE rawImfile SET magicked = %" PRId64 " where exp_id = %" PRId64 " AND class_id = '%s'"; 479 break; 480 case IPP_STAGE_CHIP: 481 query = "UPDATE chipProcessedImfile SET magicked = %" PRId64 " where chip_id = %" PRId64 " AND class_id = '%s'"; 482 break; 483 case IPP_STAGE_CAMERA: 484 // no there is no magicked column in camProcessedExp so we have nothing to do 508 485 psFree(output); 509 486 return true; 510 } 511 512 // chose the appropriate query based on the stage 513 if (!strcmp(stage, "raw")) { 514 query = "UPDATE rawImfile SET magicked = %" PRId64 " where exp_id = %" PRId64 " AND class_id = '%s'"; 515 } else if (!strcmp(stage, "chip")) { 516 query = "UPDATE chipProcessedImfile SET magicked = %" PRId64 " where chip_id = %" PRId64 " AND class_id = '%s'"; 517 } else if (!strcmp(stage, "warp")) { 487 case IPP_STAGE_WARP: 518 488 query = "UPDATE warpSkyfile SET magicked = %" PRId64 " where warp_id = %" PRId64 " AND skycell_id = '%s'"; 519 } else if (!strcmp(stage, "diff")) { 489 break; 490 case IPP_STAGE_DIFF: 520 491 query = "UPDATE diffSkyfile SET magicked = %" PRId64 " where diff_id = %" PRId64 " AND skycell_id = '%s'"; 521 } else { 492 break; 493 default: 522 494 psError(PS_ERR_UNKNOWN, true, "unexpected value for stage: %s found", stage); 523 495 psFree(output); 524 496 return false; 525 497 } 498 526 499 if (!p_psDBRunQueryF(config->dbh, query, magic_ds_id, stage_id, component)) { 527 500 psError(PS_ERR_UNKNOWN, false, "database error"); … … 571 544 psS64 stage_id = psMetadataLookupS64(NULL, row, "stage_id"); 572 545 546 ippStage stageNum = ippStringToStage(stage); 573 547 574 548 // chose the appropriate query based on the stage 575 if (!strcmp(stage, "raw")) { 549 switch (stageNum) { 550 case IPP_STAGE_RAW: 576 551 query = "UPDATE rawExp SET magicked = %" PRId64 " where exp_id = %" PRId64; 577 } else if (!strcmp(stage, "chip")) { 552 break; 553 case IPP_STAGE_CHIP: 578 554 query = "UPDATE chipRun SET magicked = %" PRId64 " where chip_id = %" PRId64; 579 } else if (!strcmp(stage, "camera")) { 555 break; 556 case IPP_STAGE_CAMERA: 580 557 query = "UPDATE camRun SET magicked = %" PRId64 " where cam_id = %" PRId64; 581 } else if (!strcmp(stage, "warp")) { 558 break; 559 case IPP_STAGE_WARP: 582 560 query = "UPDATE warpRun SET magicked = %" PRId64 " where warp_id = %" PRId64; 583 } else if (!strcmp(stage, "diff")) { 561 break; 562 case IPP_STAGE_DIFF: 584 563 query = "UPDATE diffRun SET magicked = %" PRId64 " where diff_id = %" PRId64; 585 } else { 564 break; 565 default: 586 566 psError(PS_ERR_UNKNOWN, true, "unexpected value for stage: %s found", stage); 587 567 psFree(output); … … 671 651 PS_ASSERT_PTR_NON_NULL(cam_id, false); 672 652 673 if (!strcmp(stage, "diff")) { 674 // don't need these ids for diff stage because diff_id is in the magicRun 675 *stage_id = 0; 676 *cam_id = 0; 677 return true; 678 } 679 680 int stageNum; 681 if (!strcmp(stage, "raw")) { 682 stageNum = 0; 683 } else if (!strcmp(stage, "chip")) { 684 stageNum = 1; 685 } else if (!strcmp(stage, "camera")) { 686 stageNum = 2; 687 } else if (!strcmp(stage, "warp")) { 688 stageNum = 3; 689 } else { 690 psError(PXTOOLS_ERR_DATA, true, "%s is not a valid value for stage", stage); 691 return false; 692 } 693 653 int stageNum = ippStringToStage(stage);; 654 if (stageNum == IPP_STAGE_NONE) { 655 psError(PXTOOLS_ERR_DATA, false, "%s is not a valid value for stage", stage); 656 return false; 657 } 694 658 695 659 psString query = pxDataGet("magicdstool_getrunids.sql"); … … 724 688 725 689 *cam_id = psMetadataLookupS64(NULL, row, "cam_id"); 726 if (stageNum == 0) { 690 switch (stageNum) { 691 case IPP_STAGE_RAW: 727 692 *stage_id = psMetadataLookupS64(NULL, row, "exp_id"); 728 } else if (stageNum == 1) { 693 break; 694 case IPP_STAGE_CHIP: 729 695 *stage_id = psMetadataLookupS64(NULL, row, "chip_id"); 730 } else if (stageNum == 2) { 696 break; 697 case IPP_STAGE_CAMERA: 731 698 *stage_id = *cam_id; 732 } else if (stageNum == 3) { 699 return true; 700 case IPP_STAGE_WARP: 733 701 *stage_id = psMetadataLookupS64(NULL, row, "warp_id"); 702 break; 703 case IPP_STAGE_DIFF: 704 *stage_id = psMetadataLookupS64(NULL, row, "diff_id"); 705 break; 734 706 } 735 707 -
trunk/ippTools/src/magicdstoolConfig.c
r24693 r24882 49 49 // -definebyquery 50 50 psMetadata *definebyqueryArgs = psMetadataAlloc(); 51 #ifdef notyet 52 psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-workdir", 0, "define workdir (required)", NULL); 53 psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-label", 0, "define label", NULL); 54 psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-dvodb", 0, "define dvodb", NULL); 55 psMetadataAddTime(definebyqueryArgs, PS_LIST_TAIL, "-registered", 0, "time detrend run was registered", now); 56 psMetadataAddS64(definebyqueryArgs, PS_LIST_TAIL, "-exp_id", 0, "search exp_id", 0); 57 psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-diff_label", 0, "select diff label", NULL); 58 psMetadataAddF32(definebyqueryArgs, PS_LIST_TAIL, "-good_frac", 0, "limit good_frac", NAN); 59 psMetadataAddBool(definebyqueryArgs, PS_LIST_TAIL, "-available", 0, "process what's immediately available?", false); 60 psMetadataAddBool(definebyqueryArgs, PS_LIST_TAIL, "-new", 0, "generate new run even if existing?", false); 61 psMetadataAddBool(definebyqueryArgs, PS_LIST_TAIL, "-simple", 0, "use the simple output format", false); 62 #endif 51 psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-stage", 0, "define stage (required)", NULL); 52 psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-workdir", 0, "define workdir", NULL); 53 psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-recoveryroot", 0, "define recovery directory", NULL); 54 psMetadataAddBool(definebyqueryArgs, PS_LIST_TAIL, "-replace", 0, "replace input files with the destreaked versions", false); 55 psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-set_label", 0, "define label", NULL); 56 57 psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-label", PS_META_DUPLICATE_OK, "search by magicRun.label", NULL); 58 psMetadataAddS64(definebyqueryArgs, PS_LIST_TAIL, "-exp_id", 0, "search by exp_id", 0); 59 psMetadataAddS64(definebyqueryArgs, PS_LIST_TAIL, "-chip_id", 0, "search by chip_id", 0); 60 psMetadataAddS64(definebyqueryArgs, PS_LIST_TAIL, "-cam_id", 0, "search by cam_id", 0); 61 psMetadataAddS64(definebyqueryArgs, PS_LIST_TAIL, "-warp_id", 0, "search by warp_id", 0); 62 psMetadataAddS64(definebyqueryArgs, PS_LIST_TAIL, "-diff_id", 0, "search by diff_id", 0); 63 psMetadataAddS64(definebyqueryArgs, PS_LIST_TAIL, "-magic_id", 0, "search by magic_id", 0); 64 65 psMetadataAddBool(definebyqueryArgs, PS_LIST_TAIL, "-rerun", 0, "queue a new run even if one arleady exists", false); 66 psMetadataAddBool(definebyqueryArgs, PS_LIST_TAIL, "-dry_run", 0, "don't queue runs just display what would be queued", false); 67 psMetadataAddBool(definebyqueryArgs, PS_LIST_TAIL, "-simple", 0, "use the simple output format", false); 68 psMetadataAddU64(definebyqueryArgs, PS_LIST_TAIL, "-limit", 0, "limit result set to N items", 0); 63 69 64 70 // -definerun 65 71 psMetadata *definerunArgs = psMetadataAlloc(); 66 72 psMetadataAddS64(definerunArgs, PS_LIST_TAIL, "-magic_id", 0, "define magic_id (required)", 0); 67 psMetadataAddStr(definerunArgs, PS_LIST_TAIL, "-stage", 0, "define output directory(required)", NULL);73 psMetadataAddStr(definerunArgs, PS_LIST_TAIL, "-stage", 0, "define stage for run (required)", NULL); 68 74 psMetadataAddStr(definerunArgs, PS_LIST_TAIL, "-outroot", 0, "define output directory (required)", NULL); 69 75 psMetadataAddStr(definerunArgs, PS_LIST_TAIL, "-recoveryroot", 0, "define recovery directory", NULL); … … 89 95 psMetadataAddS64(todestreakArgs, PS_LIST_TAIL, "-magic_id", 0, "search by magic ID", 0); 90 96 psMetadataAddStr(todestreakArgs, PS_LIST_TAIL, "-label", PS_META_DUPLICATE_OK, "define label", NULL); 97 psMetadataAddStr(todestreakArgs, PS_LIST_TAIL, "-stage", 0, "limit query to stage", NULL); 91 98 psMetadataAddU64(todestreakArgs, PS_LIST_TAIL, "-limit", 0, "limit result set to N items", 0); 92 99 psMetadataAddBool(todestreakArgs, PS_LIST_TAIL, "-simple", 0, "use the simple output format", false);
Note:
See TracChangeset
for help on using the changeset viewer.
