IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 18, 2012, 5:57:19 AM (14 years ago)
Author:
eugene
Message:

merge changes from trunk

Location:
branches/eam_branches/ipp-20121130/ippTools/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20121130/ippTools/src

  • branches/eam_branches/ipp-20121130/ippTools/src/difftool.c

    r34538 r34839  
    25612561
    25622562    PXOPT_LOOKUP_S64(diff_id, config->args, "-diff_id", false, false);
     2563    PXOPT_LOOKUP_BOOL(all, config->args, "-all", false);
    25632564    PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false);
    25642565    PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false);
     
    25702571    pxAddLabelSearchArgs (config, where, "-label", "diffRun.label", "==");
    25712572
    2572     psString query = pxDataGet("difftool_pendingcleanupskyfile.sql");
     2573    char * sql_file  = all ? "difftool_pendingcleanupskyfile_all.sql": "difftool_pendingcleanupskyfile.sql" ;
     2574    psString query = pxDataGet(sql_file);
    25732575    if (!query) {
    25742576        psError(PXTOOLS_ERR_SYS, false, "failed to retreive SQL statement");
     
    27402742    PS_ASSERT_PTR_NON_NULL(config, false);
    27412743
    2742     PXOPT_LOOKUP_S16(fault, config->args, "-fault", true, false);
    2743     PXOPT_LOOKUP_S16(quality, config->args, "-set_quality", false, false);
    2744 
    2745     psMetadata *where = psMetadataAlloc();
    2746     PXOPT_COPY_S64(config->args, where, "-diff_id",   "diff_id",   "==");
    2747     PXOPT_COPY_STR(config->args, where, "-skycell_id", "skycell_id",   "==");
    2748 
    2749     if (!pxSetFaultCode(config->dbh, "diffSkyfile", where, fault, quality)) {
    2750         psError(PS_ERR_UNKNOWN, false, "failed to set set fault flag");
     2744    PXOPT_LOOKUP_STR(state, config->args, "-set_state", false, false);
     2745
     2746    if (!state) {
     2747        psMetadata *where = psMetadataAlloc();
     2748        PXOPT_COPY_S64(config->args, where, "-diff_id",   "diff_id",   "==");
     2749        PXOPT_COPY_STR(config->args, where, "-skycell_id", "skycell_id",   "==");
     2750
     2751        PXOPT_LOOKUP_S16(fault, config->args, "-fault", true, false);
     2752        PXOPT_LOOKUP_S16(quality, config->args, "-set_quality", false, false);
     2753
     2754        if (!pxSetFaultCode(config->dbh, "diffSkyfile", where, fault, quality)) {
     2755            psError(PS_ERR_UNKNOWN, false, "failed to set set fault flag");
     2756            psFree (where);
     2757            return false;
     2758        }
    27512759        psFree (where);
    2752         return false;
    2753     }
    2754     psFree (where);
     2760    } else {
     2761      if (strcmp(state,"error_cleaned") == 0) {
     2762        change_skyfile_data_state(config,"error_cleaned", "goto_cleaned");
     2763      }
     2764      else if (strcmp(state, "error_scrubbed") == 0) {
     2765        change_skyfile_data_state(config,"error_scrubbed", "goto_scrubbed");
     2766      }
     2767      else if (strcmp(state, "error_purged") == 0) {
     2768        change_skyfile_data_state(config,"error_purged", "goto_purged");
     2769      }
     2770      else {
     2771        psError(PS_ERR_UNKNOWN, false, "unhandled state given");
     2772        return(false);
     2773      }
     2774    }
    27552775
    27562776    return true;
Note: See TracChangeset for help on using the changeset viewer.