IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 29, 2010, 3:55:49 PM (16 years ago)
Author:
eugene
Message:

update merges from trunk

Location:
branches/eam_branches/20100225
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/20100225

  • branches/eam_branches/20100225/ippTools/src/magicdstool.c

    r26981 r27517  
    114114    PXOPT_LOOKUP_STR(note, config->args, "-set_note", false, false);
    115115    PXOPT_LOOKUP_BOOL(rerun, config->args, "-rerun", false);
    116     PXOPT_LOOKUP_BOOL(dry_run, config->args, "-dry_run", false);
     116    PXOPT_LOOKUP_BOOL(pretend, config->args, "-pretend", false);
    117117    PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false);
    118118    PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false);
     
    237237    // Parse the list of runs ready to be destreaked
    238238
    239     if (!dry_run && !psDBTransaction(config->dbh)) {
     239    if (!pretend && !psDBTransaction(config->dbh)) {
    240240        psError(PS_ERR_UNKNOWN, false, "database error");
    241241        return false;
     
    286286        }
    287287
    288         if (!dry_run) {
     288        if (!pretend) {
    289289            if (!magicDSRunInsertObject(config->dbh, run)) {
    290290                psError(PS_ERR_UNKNOWN, false, "database error");
     
    305305    }
    306306
    307     if (!dry_run && !psDBCommit(config->dbh)) {
     307    if (!pretend && !psDBCommit(config->dbh)) {
    308308        psError(PS_ERR_UNKNOWN, false, "database error");
    309309        return false;
     
    392392        return false;
    393393    }
    394     const char *rerun_flag =  rerun ? "\n" : ""; // String to give query to activate (or not) rerun
     394    const char *rerun_flag =  rerun ? "" : "\n"; // String to give query to activate (or not) rerun
    395395
    396396    if (stageNum != IPP_STAGE_DIFF) {
     
    408408            psFree(limitString);
    409409        }
    410         if (!p_psDBRunQueryF(config->dbh, query, rerun_flag)) {
     410        if (!p_psDBRunQueryF(config->dbh, query, set_label, rerun_flag)) {
    411411            psError(PS_ERR_UNKNOWN, false, "database error");
    412412            psFree(query);
     
    552552    // optional
    553553    PXOPT_LOOKUP_STR(set_label, config->args, "-set_label", false, false);
     554    PXOPT_LOOKUP_STR(set_data_group, config->args, "-set_data_group", false, false);
    554555    psString setString = NULL;
    555556    if (set_label) {
    556557        psStringAppend(&setString, ", label = '%s'", set_label);
     558    }
     559    if (set_data_group) {
     560        psStringAppend(&setString, ", data_group = '%s'", set_data_group);
    557561    }
    558562
     
    573577    PXOPT_COPY_S64(config->args, where, "-stage_id", "stage_id", "==");
    574578    PXOPT_COPY_STR(config->args, where, "-stage", "stage", "==");
     579    PXOPT_COPY_STR(config->args, where, "-state", "state", "==");
     580    PXOPT_COPY_STR(config->args, where, "-data_group", "data_group", "LIKE");
    575581
    576582    if (psListLength(where->list) < 2) {
     
    832838    PXOPT_LOOKUP_BOOL(setmagicked, config->args, "-setmagicked", false);
    833839    PXOPT_LOOKUP_F32(streak_frac, config->args, "-streak_frac", false, false);
     840    PXOPT_LOOKUP_F32(nondiff_frac, config->args, "-nondiff_frac", false, false);
    834841    PXOPT_LOOKUP_F32(run_time, config->args, "-run_time", false, false);
    835842
     
    861868            recovery_path_base,
    862869            streak_frac,
     870            nondiff_frac,
    863871            run_time,
    864872            fault,
     
    11901198    if (!((strcmp(state, "new") == 0) ||
    11911199          (strcmp(state, "full") == 0) ||
     1200          (strcmp(state, "drop") == 0) ||
    11921201          (strcmp(state, "failed_revert") == 0) ||
    11931202          (strcmp(state, "failed_cleanup") == 0) ||
     
    13981407    psMetadata *where = psMetadataAlloc();
    13991408
    1400     PXOPT_COPY_S64(config->args, where, "-stage", "stage", "==");
     1409    PXOPT_COPY_STR(config->args, where, "-stage", "stage", "==");
    14011410    PXOPT_COPY_S64(config->args, where, "-magic_ds_id", "magic_ds_id", "==");
    14021411    PXOPT_COPY_S64(config->args, where, "-magic_id", "magic_id", "==");
Note: See TracChangeset for help on using the changeset viewer.