IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 28959 for trunk/ippTools/src


Ignore:
Timestamp:
Aug 18, 2010, 7:42:49 PM (16 years ago)
Author:
bills
Message:

Changes to support distribution of the "sky" stage (short for staticsky)

Location:
trunk/ippTools/src
Files:
2 edited

Legend:

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

    r28938 r28959  
    329329        // stack stage doesn't require magic
    330330        no_magic = true;
     331    } else if (!strcmp(stage, "sky")) {
     332        magicRunType = "staticskyRun";
     333        query = pxDataGet("disttool_definebyquery_sky.sql");
     334        if (!query) {
     335            psError(PXTOOLS_ERR_SYS, false, "failed to retreive SQL statement");
     336            psFree(where);
     337            return false;
     338        }
     339
     340        if (label) {
     341            psStringAppend(&query, " AND (staticskyRun.label = '%s')", label);
     342        }
     343        if (dist_group) {
     344            psStringAppend(&query, " AND (sticskyRun.dist_group = '%s')", dist_group);
     345        }
     346        // (static)sky stage doesn't require magic
     347        no_magic = true;
    331348    } else if (!strcmp(stage, "SSdiff")) {
    332349      magicRunType = "diffRun";
  • trunk/ippTools/src/staticskytool.c

    r28154 r28959  
    727727bool exportrunMode(pxConfig *config)
    728728{
    729 # if (0)
    730729  typedef struct ExportTable {
    731730    char tableName[80];
     
    737736  PS_ASSERT_PTR_NON_NULL(config, NULL);
    738737
    739   PXOPT_LOOKUP_S64(det_id, config->args, "-stack_id", true,  false);
     738  PXOPT_LOOKUP_S64(det_id, config->args, "-sky_id", true,  false);
    740739  PXOPT_LOOKUP_STR(outfile, config->args, "-outfile", true,  false);
    741740  PXOPT_LOOKUP_BOOL(clean, config->args, "-clean", false);
     
    753752  }
    754753  psMetadata *where = psMetadataAlloc();
    755   PXOPT_COPY_S64(config->args, where, "-stack_id", "stack_id", "==");
     754  PXOPT_COPY_S64(config->args, where, "-sky_id", "sky_id", "==");
    756755
    757756  ExportTable tables [] = {
    758     {"stackRun", "staticskytool_export_run.sql"},
    759     {"stackInputSkyfile", "staticskytool_export_input_skyfile.sql"},
    760     {"stackSumSkyfile", "staticskytool_export_sum_skyfile.sql"},
     757    {"staticskyRun", "staticskytool_export_run.sql"},
     758    {"staticskyInput", "staticskytool_export_input.sql"},
     759    {"staticskyResult", "staticskytool_export_result.sql"},
    761760  };
    762761
     
    800799
    801800    if (clean) {
    802         if (!strcmp(tables[i].tableName, "stackRun")) {
    803             if (!pxSetStateCleaned("stackRun", "state", output)) {
     801        if (!strcmp(tables[i].tableName, "staticskyRun")) {
     802            if (!pxSetStateCleaned("staticskyRun", "state", output)) {
    804803                psFree(output);
    805804                psError(PS_ERR_UNKNOWN, false, "pxSetStateClean failed for table %s",  tables[i].tableName);
     
    821820    fclose (f);
    822821
    823 # endif
    824822    return true;
    825823}
Note: See TracChangeset for help on using the changeset viewer.