IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 26113


Ignore:
Timestamp:
Nov 12, 2009, 3:53:33 PM (16 years ago)
Author:
Paul Price
Message:

Only update the state when the run was successful.

File:
1 edited

Legend:

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

    r25935 r26113  
    184184        bool status;
    185185        char *end_stage = psMetadataLookupStr(&status, md, "end_stage");
    186         if (end_stage && strcasecmp(end_stage, "warp")) continue;
     186        if (end_stage && strcasecmp(end_stage, "warp")) continue;
    187187
    188188        char *raw_tess_id   = psMetadataLookupStr(&status, md, "tess_id");
    189         if (raw_tess_id || tess_id) continue;
     189        if (raw_tess_id || tess_id) continue;
    190190
    191191        char *label  = psMetadataLookupStr(&status, md, "label");
     
    193193
    194194        if (!status) {
    195             psError(PS_ERR_UNKNOWN, false, "cannot queue analysis to WARP without a defined tess id: label: %s, exp_id %" PRId64, label, exp_id);
     195            psError(PS_ERR_UNKNOWN, false, "cannot queue analysis to WARP without a defined tess id: label: %s, exp_id %" PRId64, label, exp_id);
    196196            psFree(output);
    197197            return false;
     
    479479    PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false);
    480480    PXOPT_LOOKUP_S16(quality, config->args, "-quality", false, false);
    481    
     481
    482482    PXOPT_LOOKUP_S64(magicked, config->args, "-magicked", false, false);
    483483
     
    603603    }
    604604
    605     // since there is only one exp per 'new' set camRun.state = 'full'
    606     if (!pxcamRunSetState(config, row->cam_id, "full", magicked)) {
    607         psError(PS_ERR_UNKNOWN, false, "failed to change camRun.state for cam_id: %" PRId64, row->cam_id);
    608         psFree(row);
    609         psFree(pendingRow);
    610         return false;
    611     }
    612 
    613605    // NULL for end_stage means go as far as possible
    614606    // EAM : skip here if fault != 0
     
    623615        return true;
    624616    }
     617    // else continue on...
     618
     619    // since there is only one exp per 'new' set camRun.state = 'full'
     620    if (!pxcamRunSetState(config, row->cam_id, "full", magicked)) {
     621        psError(PS_ERR_UNKNOWN, false, "failed to change camRun.state for cam_id: %" PRId64, row->cam_id);
     622        psFree(row);
     623        psFree(pendingRow);
     624        return false;
     625    }
    625626    psFree(row);
    626     // else continue on...
    627627
    628628    if (!pxfakeQueueByCamID(config,
     
    691691        psStringAppend(&query, " WHERE %s", whereClause);
    692692        psFree(whereClause);
    693     } 
     693    }
    694694
    695695    // we either add AND (condition) or WHERE (condition):
     
    697697        // list only faulted rows
    698698        psStringAppend(&query, " %s", " AND camProcessedExp.fault != 0");
    699     } 
     699    }
    700700    if (where->list && !faulted) {
    701701        // don't list faulted rows
     
    705705        // list only faulted rows
    706706        psStringAppend(&query, " %s", " WHERE camProcessedExp.fault != 0");
    707     } 
     707    }
    708708    if (!where->list && !faulted) {
    709709        // don't list faulted rows
Note: See TracChangeset for help on using the changeset viewer.