IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 27786


Ignore:
Timestamp:
Apr 27, 2010, 2:46:37 PM (16 years ago)
Author:
bills
Message:

don't clean up camera stage destreak runs. (Don't delete the uncensored sources)

File:
1 edited

Legend:

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

    r27745 r27786  
    572572    // we can transition by query as well
    573573
    574 
    575574    psMetadata *where = psMetadataAlloc();
    576575    PXOPT_COPY_STR(config->args, where, "-label", "label", "==");
     
    12251224    }
    12261225
    1227     psString stateCheck = NULL;
    1228     if (!strcmp(state, "goto_cleaned")) {
    1229         // science cleanup sets runs to goto_cleaned. Don't undo it if already cleaned
    1230         psStringAppend(&stateCheck, " AND magicDSRun.state != 'cleaned'");
    1231     }
    1232 
    1233 
    12341226    psString query = NULL;
    12351227    psStringAppend(&query, "UPDATE magicDSRun SET state = '%s' %s\n", state, extraSetStr ? extraSetStr : "");
     
    12411233        psFree(whereClause);
    12421234    } else {
    1243         psError(PS_ERR_UNKNOWN, true, "search arugments are required");
    1244         return false;
    1245     }
    1246 
    1247     if (stateCheck) {
    1248         psStringAppend(&query, stateCheck);
    1249     }
    1250     psFree(stateCheck);
     1235        psError(PS_ERR_UNKNOWN, true, "search arguments are required");
     1236        return false;
     1237    }
     1238
     1239    if (!strcmp(state, "goto_cleaned")) {
     1240        // Don't set state back to goto_cleaned if it is already cleaned
     1241        psStringAppend(&query, " AND (magicDSRun.state != 'cleaned')");
     1242
     1243        // don't clean up magicDSRun's where stage is camera
     1244        psStringAppend(&query, " AND (magicDSRun.stage != 'camera')");
     1245    }
     1246
    12511247    if (!p_psDBRunQuery(config->dbh, query)) {
    12521248        psError(PS_ERR_UNKNOWN, false,
Note: See TracChangeset for help on using the changeset viewer.