IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 23386 for trunk/ippTools


Ignore:
Timestamp:
Mar 18, 2009, 10:15:08 AM (17 years ago)
Author:
bills
Message:

add chipRun.magicked

File:
1 edited

Legend:

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

    r21402 r23386  
    128128}
    129129
    130 bool pxchipRunSetState(pxConfig *config, psS64 chip_id, const char *state)
     130bool pxchipRunSetState(pxConfig *config, psS64 chip_id, const char *state, const bool magicked)
    131131{
    132132    PS_ASSERT_PTR_NON_NULL(config, false);
     
    139139    }
    140140
    141     char *query = "UPDATE chipRun SET state = '%s' WHERE chip_id = %" PRId64;
    142     if (!p_psDBRunQueryF(config->dbh, query, state, chip_id)) {
     141    char *query = "UPDATE chipRun SET state = '%s', magicked = %d WHERE chip_id = %" PRId64;
     142    if (!p_psDBRunQueryF(config->dbh, query, state, magicked, chip_id)) {
    143143        psError(PS_ERR_UNKNOWN, false,
    144144                "failed to change state for chip_id %" PRId64, chip_id);
     
    158158    if (!pxIsValidState(state)) {
    159159        psError(PS_ERR_UNKNOWN, false, "invalid chipRun state: %s", state);
     160        return false;
     161    }
     162
     163    if (!strcmp(state, "full")) {
     164        // There are states that need to be met for a run to be set to full that we don't
     165        // check here.
     166        // for example all of the run's Imfiles must have chipProcessedImfile.data_state == "full"
     167        // chipRun.magicked = (SUM(!chipProcessedImfile.magicked) = 0)
     168        // so don't do allow setting the state to full
     169        psError(PS_ERR_UNKNOWN, true, "cannot use -updaterun so set chipRun state to full");
    160170        return false;
    161171    }
     
    253263            dvodb,
    254264            tess_id,
    255             end_stage)
     265            end_stage,
     266            0           // magicked
     267            )
    256268    ) {
    257269        if (!psDBRollback(config->dbh)) {
Note: See TracChangeset for help on using the changeset viewer.