IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 19, 2006, 4:16:26 PM (21 years ago)
Author:
jhoblitt
Message:

compilation fixes
switch to using the metadatadb API

File:
1 edited

Legend:

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

    r5881 r6060  
    22
    33// select pending frames (exposure+images) which are not done, select their done images, count, update
    4 bool p2updatePendingFrames (p2SearchConfig *config, psArray *pendingFrames) {
     4bool p2updatePendingFrames (p2Config *config, psArray *pendingFrames) {
    55
    66    psMetadata *where = psMetadataAlloc ();
    77
    88    // select all of the exposures which are still pending
    9     psMetadataAddStr (where, PS_LIST_TAIL, "STATE", 0, "==", P2_STATE_PENDING);
    10     psArray *exposures = p2PendingExposureSelectRows (config->database, where, MAX_ROWS);
     9    psMetadataAddS32 (where, PS_LIST_TAIL, "STATE", 0, "==", P2_MODE_PENDING);
     10    psArray *exposures = p2PendingExpSelectRowObjects (config->database, where, MAX_ROWS);
    1111
    1212    // we will now select all of the matching images which are done
    13     psMetadataAddStr (where, PS_LIST_TAIL, "STATE", PS_META_REPLACE, "==", P2_STATE_DONE);
     13    psMetadataAddS32 (where, PS_LIST_TAIL, "STATE", PS_META_REPLACE, "==", P2_MODE_DONE);
    1414    for (int i = 0; i < exposures->n; i++) {
    15         p2PendingExposure *exposure = exposures->data[i];
     15        p2PendingExpRow *exposure = exposures->data[i];
    1616
    1717        // find the next available version numbers
    18         psMetadataAddStr (where, PS_LIST_TAIL, "EXP_ID",     PS_META_REPLACE, "==", exposure->expID);
    19         psMetadataAddStr (where, PS_LIST_TAIL, "P2_VERSION", PS_META_REPLACE, "==", exposure->P2version);
    20         psArray *images = p2PendingImageSelectRows (config->database, where, MAX_ROWS);
    21         if (images->n != exposure->Nclass) {
     18        psMetadataAddStr (where, PS_LIST_TAIL, "EXP_ID",     PS_META_REPLACE, "==", exposure->exp_id);
     19        psMetadataAddS32 (where, PS_LIST_TAIL, "P2_VERSION", PS_META_REPLACE, "==", exposure->p2_version);
     20        psArray *images = p2PendingImfileSelectRowObjects (config->database, where, MAX_ROWS);
     21        if (images->n != exposure->nclass) {
    2222            // free things
    2323            continue;
     
    2525        // frame is complete, set exposure state to done
    2626        // XXX add P2 stats here?
    27         exposure->state = P2_STATE_DONE;
    28         p2PendingExposureUpdateRows (config->database, exposure);
     27//      exposure->state = P2_MODE_DONE;
     28//      p2PendingExposureUpdateRows (config->database, exposure);
    2929    }
    3030    return true;
Note: See TracChangeset for help on using the changeset viewer.