IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 23661 for trunk/ippTools/src


Ignore:
Timestamp:
Apr 1, 2009, 3:22:25 PM (17 years ago)
Author:
bills
Message:

various changes to disttool

Location:
trunk/ippTools/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/src/disttool.c

    r23566 r23661  
    9292    PS_ASSERT_PTR_NON_NULL(config, false);
    9393
     94    // required
    9495    PXOPT_LOOKUP_STR(stage, config->args, "-stage", true, false);
    9596    PXOPT_LOOKUP_S64(stage_id, config->args, "-stage_id",  true, false);
    9697    PXOPT_LOOKUP_STR(outroot, config->args, "-outroot", true, false);
     98    // optional
     99    PXOPT_LOOKUP_S64(target_id, config->args, "-target_id",  false, false);
    97100    PXOPT_LOOKUP_BOOL(clean, config->args, "-clean", false);
     101    PXOPT_LOOKUP_BOOL(no_magic, config->args, "-no_magic", false);
    98102    PXOPT_LOOKUP_STR(set_label, config->args, "-set_label", false, false);
    99103
     
    101105    // XXX: all of the following concerns will be managed properly by definebyquery
    102106
    103     // TODO: check that stage_id actually exists for stage
     107    // TODO: should we check that stage_id actually exists for stage
    104108    // in magicdstool we queue off of a magic_id so the stage_id, exp_id, and cam_id get looked up
    105109    // when the run is queued
    106     // Should we also check here that the run is full or cleaned and that all of the images
    107     // are magicked. We need to do that at run time as well since the run and magic state can
    108     // change between the time that it is queued.
    109 
    110     if (!distRunInsert(config->dbh, 0, stage, stage_id, set_label, outroot, clean, "new", NULL, 0)) {
     110
     111    if (!distRunInsert(config->dbh,
     112            0,          // dist_id
     113            target_id,
     114            stage,
     115            stage_id,
     116            set_label,
     117            outroot,
     118            clean,
     119            no_magic,
     120            "new",
     121            NULL,       // time_stamp
     122            0           // fault
     123            )) {
    111124        psError(PS_ERR_UNKNOWN, false, "database error");
    112125        return false;
     
    296309    PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false);
    297310    PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false);
    298     PXOPT_LOOKUP_BOOL(need_magic, config->args, "-need_magic", false);
    299311
    300312    // look for "inputs" that need to processed
     
    319331    }
    320332
    321     psString    chip_magic = "";
     333    // the query has where hooks for each stage.
     334    // right now we aren't using them.
     335    // XXX: I think that I want to change the query from a union of selects on the various
     336    // stages to separate queries. As it is pending data at the later stages of the pipline
     337    // will get blocked by pending earlier stages
    322338    psString    raw_where = "";
    323339    psString    chip_where = "";
     
    328344    psString    stack_where = "";
    329345
    330     if (need_magic) {
    331         chip_magic = psStringCopy("\nAND chipRun.magicked");
    332         raw_where  = psStringCopy("\nAND rawExp.magicked");
    333         chip_where = psStringCopy("\nAND (distRun.clean OR chipRun.magicked)");
    334         // chipRun must be magicked to allow release camera level masks
    335         camera_where = psStringCopy("\nAND (distRun.clean OR chipRun.magicked)");
    336         warp_where = psStringCopy("\nAND (distRun.clean OR warpRun.magicked)");
    337         diff_where = psStringCopy("\nAND (distRun.clean OR diffRun.magicked)");
    338     }
    339 
    340346    if (!p_psDBRunQueryF(config->dbh,
    341347            query,
    342             chip_magic,
    343348            raw_where,
    344349            chip_where,
  • trunk/ippTools/src/disttoolConfig.c

    r23566 r23661  
    4848    psMetadataAddS64(definerunArgs, PS_LIST_TAIL, "-stage_id", 0, "define stage_id (required)", 0);
    4949    psMetadataAddStr(definerunArgs, PS_LIST_TAIL, "-outroot",  0, "define output destination (required)", NULL);
     50    psMetadataAddS64(definerunArgs, PS_LIST_TAIL, "-target_id", 0, "define stage_id", 0);
    5051    psMetadataAddBool(definerunArgs, PS_LIST_TAIL, "-clean", 0,   "build clean distribution bundle", false);
     52    psMetadataAddBool(definerunArgs, PS_LIST_TAIL, "-no_magic", 0, "magic is not needed", false);
    5153    psMetadataAddStr(definerunArgs, PS_LIST_TAIL, "-set_label",    0, "define label for run", NULL);
    5254   
     
    7577    psMetadataAddS64(pendingcomponentArgs, PS_LIST_TAIL, "-dist_id", 0, "define dist_id", 0);
    7678    psMetadataAddStr(pendingcomponentArgs, PS_LIST_TAIL, "-stage",    0, "limit results to runs for stage", NULL);
    77     psMetadataAddBool(pendingcomponentArgs, PS_LIST_TAIL, "-need_magic", 0, "magic is needed", false);
    7879    psMetadataAddStr(pendingcomponentArgs, PS_LIST_TAIL, "-label",    0, "limit results to label", NULL);
    7980    psMetadataAddU64(pendingcomponentArgs, PS_LIST_TAIL, "-limit",  0,  "limit result set to N items", 0);
Note: See TracChangeset for help on using the changeset viewer.