IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 23, 2007, 3:41:56 PM (19 years ago)
Author:
jhoblitt
Message:

s/p0/reg/g
s/p1/guide/g
s/p2/chip/g
s/p6/stack/g
s/p5/diff/g
s/p4/warp/g
s/p3/cam/g

File:
1 edited

Legend:

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

    r12004 r12024  
    4444
    4545static bool parseAndInsertSkyCellMap(pxConfig *config, const char *mapfile);
    46 static bool setp4RunState(pxConfig *config, const char *p4_id, const char *state);
     46static bool setwarpRunState(pxConfig *config, const char *warp_id, const char *state);
    4747static bool isValidMode(pxConfig *config, const char *mode);
    48 bool p4CompletedRuns(pxConfig *config);
     48bool warpCompletedRuns(pxConfig *config);
    4949
    5050# define MODECASE(caseName, func) \
     
    145145    }
    146146
    147     p4RunRow *p4Run = p4RunRowAlloc(
     147    warpRunRow *warpRun = warpRunRowAlloc(
    148148            0,          // ID
    149149            mode,
     
    154154    );
    155155    psFree(registered);
    156     if (!p4Run) {
    157         psError(PS_ERR_UNKNOWN, false, "failed to alloc p4Run object");
     156    if (!warpRun) {
     157        psError(PS_ERR_UNKNOWN, false, "failed to alloc warpRun object");
    158158        return true;
    159159    }
    160     if (!p4RunInsertObject(config->dbh, p4Run)) {
    161         psError(PS_ERR_UNKNOWN, false, "database error");
    162         psFree(p4Run);
     160    if (!warpRunInsertObject(config->dbh, warpRun)) {
     161        psError(PS_ERR_UNKNOWN, false, "database error");
     162        psFree(warpRun);
    163163        return true;
    164164    }
    165165
    166     // get the assigned p4_id
    167     p4Run->p4_id = psDBLastInsertID(config->dbh);
     166    // get the assigned warp_id
     167    warpRun->warp_id = psDBLastInsertID(config->dbh);
    168168
    169169    bool simple = false;
     
    173173        if (!status) {
    174174            psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -simple");
    175             psFree(p4Run);
    176             return false;
    177         }
    178     }
    179 
    180     if (!p4RunPrintObject(stdout, p4Run, !simple)) {
     175            psFree(warpRun);
     176            return false;
     177        }
     178    }
     179
     180    if (!warpRunPrintObject(stdout, warpRun, !simple)) {
    181181            psError(PS_ERR_UNKNOWN, false, "failed to print object");
    182             psFree(p4Run);
    183             return false;
    184     }
    185 
    186     psFree(p4Run);
     182            psFree(warpRun);
     183            return false;
     184    }
     185
     186    psFree(warpRun);
    187187
    188188    return true;
     
    195195
    196196    bool status = false;
    197     psString p4_id = psMetadataLookupStr(&status, config->args, "-p4_id");
    198     if (!status) {
    199         psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -p4t_id");
    200         return false;
    201     }
    202     if (!p4_id) {
    203         psError(PS_ERR_UNKNOWN, true, "-p4_id is required");
     197    psString warp_id = psMetadataLookupStr(&status, config->args, "-warp_id");
     198    if (!status) {
     199        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -warpt_id");
     200        return false;
     201    }
     202    if (!warp_id) {
     203        psError(PS_ERR_UNKNOWN, true, "-warp_id is required");
    204204        return false;
    205205    }
     
    217217    if (state) {
    218218        // set detRun.state to state
    219         return setp4RunState(config, p4_id, state);
     219        return setwarpRunState(config, warp_id, state);
    220220    }
    221221
     
    229229
    230230    bool status = false;
    231     psString p4_id = psMetadataLookupStr(&status, config->args, "-p4_id");
    232     if (!status) {
    233         psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -p4_id");
    234         return false;
    235     }
    236     if (!p4_id) {
    237         psError(PS_ERR_UNKNOWN, true, "-p4_id is required");
     231    psString warp_id = psMetadataLookupStr(&status, config->args, "-warp_id");
     232    if (!status) {
     233        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -warp_id");
     234        return false;
     235    }
     236    if (!warp_id) {
     237        psError(PS_ERR_UNKNOWN, true, "-warp_id is required");
    238238        return false;
    239239    }
     
    250250
    251251    // defaults to 0
    252     psS32 p3_version = psMetadataLookupS32(&status, config->args, "-p3_version");
    253     if (!status) {
    254         psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -p3_version");
     252    psS32 cam_version = psMetadataLookupS32(&status, config->args, "-cam_version");
     253    if (!status) {
     254        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -cam_version");
    255255        return false;
    256256    }
    257257
    258258    // defaults to false
    259     bool magiced = psMetadataLookupBool(&status, config->args, "-p3_version");
    260     if (!status) {
    261         psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -p3_version");
    262         return false;
    263     }
    264 
    265     // XXX need to validate the p4_id here
     259    bool magiced = psMetadataLookupBool(&status, config->args, "-cam_version");
     260    if (!status) {
     261        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -cam_version");
     262        return false;
     263    }
     264
     265    // XXX need to validate the warp_id here
    266266    // XXX instead of validiting it here we should just use forgein key
    267267    // constrants
    268     if (!p4InputExpInsert(config->dbh,
    269             (psS32)atoi(p4_id),
     268    if (!warpInputExpInsert(config->dbh,
     269            (psS32)atoi(warp_id),
    270270            exp_tag,
    271             p3_version,
     271            cam_version,
    272272            magiced
    273273        )) {
     
    294294    psString query = psStringCopy(
    295295        "SELECT\n"
    296         "   p3ProcessedExp.*\n"
    297         " FROM p4Run\n"
    298         " JOIN p4InputExp\n"
    299         "   USING(p4_id)\n"
    300         " JOIN p3ProcessedExp\n"
    301         "   ON p4InputExp.exp_tag = p3ProcessedExp.exp_tag\n"
    302         "   AND p4InputExp.p3_version = p3ProcessedExp.p3_version\n"
     296        "   camProcessedExp.*\n"
     297        " FROM warpRun\n"
     298        " JOIN warpInputExp\n"
     299        "   USING(warp_id)\n"
     300        " JOIN camProcessedExp\n"
     301        "   ON warpInputExp.exp_tag = camProcessedExp.exp_tag\n"
     302        "   AND warpInputExp.cam_version = camProcessedExp.cam_version\n"
    303303        " WHERE\n"
    304         "   p4Run.state = 'run'\n"
    305         "   AND p3ProcessedExp.fault = 0\n"
     304        "   warpRun.state = 'run'\n"
     305        "   AND camProcessedExp.fault = 0\n"
    306306    );
    307307
    308308    if (config->where) {
    309         psString whereClause = psDBGenerateWhereConditionSQL(config->where, "p4InputExp");
     309        psString whereClause = psDBGenerateWhereConditionSQL(config->where, "warpInputExp");
    310310        psStringAppend(&query, " AND %s", whereClause);
    311311        psFree(whereClause);
     
    358358    if (psArrayLength(output)) {
    359359        // negative simple so the default is true
    360         if (!ippdbPrintMetadatas(stdout, output, "p4InputExp", !simple)) {
     360        if (!ippdbPrintMetadatas(stdout, output, "warpInputExp", !simple)) {
    361361            psError(PS_ERR_UNKNOWN, false, "failed to print array");
    362362            psFree(output);
     
    386386        "SELECT\n"
    387387        "   rawImfile.*\n"
    388         " FROM p4Run\n"
    389         " JOIN p4InputExp\n"
    390         "   USING(p4_id)\n"
     388        " FROM warpRun\n"
     389        " JOIN warpInputExp\n"
     390        "   USING(warp_id)\n"
    391391        " JOIN rawImfile\n" // is there any reason not to refer back to rawimfiles?
    392         "   ON p4InputExp.exp_tag = rawImfile.exp_tag\n"
     392        "   ON warpInputExp.exp_tag = rawImfile.exp_tag\n"
    393393        " WHERE\n"
    394         "   p4Run.state = 'run'\n"
     394        "   warpRun.state = 'run'\n"
    395395    );
    396396    if (config->where) {
    397         psString whereClause = psDBGenerateWhereConditionSQL(config->where, "p4InputExp");
     397        psString whereClause = psDBGenerateWhereConditionSQL(config->where, "warpInputExp");
    398398        psStringAppend(&query, " AND %s", whereClause);
    399399        psFree(whereClause);
     
    446446    if (psArrayLength(output)) {
    447447        // negative simple so the default is true
    448         if (!ippdbPrintMetadatas(stdout, output, "p4InputImfile", !simple)) {
     448        if (!ippdbPrintMetadatas(stdout, output, "warpInputImfile", !simple)) {
    449449            psError(PS_ERR_UNKNOWN, false, "failed to print array");
    450450            psFree(output);
     
    473473    psString query = psStringCopy(
    474474        "SELECT\n"
    475         "   p3ProcessedExp.*\n"
    476         " FROM p4Run\n"
    477         " JOIN p4InputExp\n"
    478         "   USING(p4_id)\n"
    479         " JOIN p3ProcessedExp\n"
    480         "   ON p4InputExp.exp_tag = p3ProcessedExp.exp_tag\n"
    481         "   AND p4InputExp.p3_version = p3ProcessedExp.p3_version\n"
    482         " LEFT JOIN p4SkyCellMap\n"
    483         "   ON p4InputExp.p4_id = p4SkyCellMap.p4_id\n"
    484         "   AND p4InputExp.exp_tag = p4SkyCellMap.exp_tag\n"
    485         "   AND p4InputExp.p3_version = p4SkyCellMap.p3_version\n"
     475        "   camProcessedExp.*\n"
     476        " FROM warpRun\n"
     477        " JOIN warpInputExp\n"
     478        "   USING(warp_id)\n"
     479        " JOIN camProcessedExp\n"
     480        "   ON warpInputExp.exp_tag = camProcessedExp.exp_tag\n"
     481        "   AND warpInputExp.cam_version = camProcessedExp.cam_version\n"
     482        " LEFT JOIN warpSkyCellMap\n"
     483        "   ON warpInputExp.warp_id = warpSkyCellMap.warp_id\n"
     484        "   AND warpInputExp.exp_tag = warpSkyCellMap.exp_tag\n"
     485        "   AND warpInputExp.cam_version = warpSkyCellMap.cam_version\n"
    486486        " WHERE\n"
    487         "   p4Run.state = 'run'\n"
    488         "   AND p3ProcessedExp.fault = 0\n"
    489         "   AND p4SkyCellMap.p4_id IS NULL\n"
    490         "   AND p4SkyCellMap.exp_tag IS NULL\n"
    491         "   AND p4SkyCellMap.p3_version IS NULL\n"
     487        "   warpRun.state = 'run'\n"
     488        "   AND camProcessedExp.fault = 0\n"
     489        "   AND warpSkyCellMap.warp_id IS NULL\n"
     490        "   AND warpSkyCellMap.exp_tag IS NULL\n"
     491        "   AND warpSkyCellMap.cam_version IS NULL\n"
    492492    );
    493493
    494494    if (config->where) {
    495         psString whereClause = psDBGenerateWhereConditionSQL(config->where, "p4InputExp");
     495        psString whereClause = psDBGenerateWhereConditionSQL(config->where, "warpInputExp");
    496496        psStringAppend(&query, " AND %s", whereClause);
    497497        psFree(whereClause);
     
    544544    if (psArrayLength(output)) {
    545545        // negative simple so the default is true
    546         if (!ippdbPrintMetadatas(stdout, output, "p4InputExp", !simple)) {
     546        if (!ippdbPrintMetadatas(stdout, output, "warpInputExp", !simple)) {
    547547            psError(PS_ERR_UNKNOWN, false, "failed to print array");
    548548            psFree(output);
     
    623623        // this conversion isn't strictly nessicary but it's an easy way of
    624624        // validating the format
    625         p4SkyCellMapRow *row = p4SkyCellMapObjectFromMetadata(sc);
     625        warpSkyCellMapRow *row = warpSkyCellMapObjectFromMetadata(sc);
    626626        if (!row) {
    627             psError(PS_ERR_UNKNOWN, false, "failed to convert mapfile: %s metdata entry into a p4SkyCellMap object", mapfile);
     627            psError(PS_ERR_UNKNOWN, false, "failed to convert mapfile: %s metdata entry into a warpSkyCellMap object", mapfile);
    628628            psFree(iter);
    629629            psFree(skycells);
     
    631631        }
    632632
    633         if (!p4SkyCellMapInsertObject(config->dbh, row)) {
     633        if (!warpSkyCellMapInsertObject(config->dbh, row)) {
    634634            psErrorCode err = psErrorCodeLast();
    635635            switch (err) {
     
    670670    psString query = psStringCopy(
    671671        "SELECT\n"
    672         "   p4SkyCellMap.*\n"
    673         " FROM p4Run\n"
    674         " JOIN p4SkyCellMap\n"
    675         "   USING(p4_id)\n"
     672        "   warpSkyCellMap.*\n"
     673        " FROM warpRun\n"
     674        " JOIN warpSkyCellMap\n"
     675        "   USING(warp_id)\n"
    676676        " WHERE\n"
    677         "   p4Run.state = 'run'\n"
     677        "   warpRun.state = 'run'\n"
    678678    );
    679679
    680680    if (config->where) {
    681         psString whereClause = psDBGenerateWhereConditionSQL(config->where, "p4SkyCellMap");
     681        psString whereClause = psDBGenerateWhereConditionSQL(config->where, "warpSkyCellMap");
    682682        psStringAppend(&query, " AND %s", whereClause);
    683683        psFree(whereClause);
     
    713713    }
    714714    if (!psArrayLength(output)) {
    715         psError(PS_ERR_UNKNOWN, false, "no p4SkyCellMap rows found");
     715        psError(PS_ERR_UNKNOWN, false, "no warpSkyCellMap rows found");
    716716        psFree(output);
    717717        return true;
     
    730730    if (psArrayLength(output)) {
    731731        // negative simple so the default is true
    732         if (!ippdbPrintMetadatas(stdout, output, "p4SkyCellMap", !simple)) {
     732        if (!ippdbPrintMetadatas(stdout, output, "warpSkyCellMap", !simple)) {
    733733            psError(PS_ERR_UNKNOWN, false, "failed to print array");
    734734            psFree(output);
     
    757757    psString query = psStringCopy(
    758758        "SELECT\n"
    759         "   p4SkyCellMap.*\n"
    760         " FROM p4Run\n"
    761         " JOIN p4SkyCellMap\n"
    762         "   USING(p4_id)\n"
    763         " LEFT JOIN p4Skyfile\n"
    764         "   USING(p4_id, skycell_id, tess_id)\n"
     759        "   warpSkyCellMap.*\n"
     760        " FROM warpRun\n"
     761        " JOIN warpSkyCellMap\n"
     762        "   USING(warp_id)\n"
     763        " LEFT JOIN warpSkyfile\n"
     764        "   USING(warp_id, skycell_id, tess_id)\n"
    765765        " WHERE\n"
    766         "   p4Run.state = 'run'\n"
    767         "   AND p4Skyfile.p4_id IS NULL\n"
    768         "   AND p4Skyfile.skycell_id IS NULL\n"
    769         "   AND p4Skyfile.tess_id IS NULL\n"
     766        "   warpRun.state = 'run'\n"
     767        "   AND warpSkyfile.warp_id IS NULL\n"
     768        "   AND warpSkyfile.skycell_id IS NULL\n"
     769        "   AND warpSkyfile.tess_id IS NULL\n"
    770770    );
    771771
    772772    if (config->where) {
    773         psString whereClause = psDBGenerateWhereConditionSQL(config->where, "p4SkyCellMap");
     773        psString whereClause = psDBGenerateWhereConditionSQL(config->where, "warpSkyCellMap");
    774774        psStringAppend(&query, " AND %s", whereClause);
    775775        psFree(whereClause);
     
    805805    }
    806806    if (!psArrayLength(output)) {
    807         psError(PS_ERR_UNKNOWN, false, "no p4PendingSkyCell rows found");
     807        psError(PS_ERR_UNKNOWN, false, "no warpPendingSkyCell rows found");
    808808        psFree(output);
    809809        return true;
     
    822822    if (psArrayLength(output)) {
    823823        // negative simple so the default is true
    824         if (!ippdbPrintMetadatas(stdout, output, "p4PendingSkyCell", !simple)) {
     824        if (!ippdbPrintMetadatas(stdout, output, "warpPendingSkyCell", !simple)) {
    825825            psError(PS_ERR_UNKNOWN, false, "failed to print array");
    826826            psFree(output);
     
    840840
    841841    bool status = false;
    842     psString p4_id = psMetadataLookupStr(&status, config->args, "-p4_id");
    843     if (!status) {
    844         psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -p4_id");
    845         return false;
    846     }
    847     if (!p4_id) {
    848         psError(PS_ERR_UNKNOWN, true, "-p4_id is required");
     842    psString warp_id = psMetadataLookupStr(&status, config->args, "-warp_id");
     843    if (!status) {
     844        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -warp_id");
     845        return false;
     846    }
     847    if (!warp_id) {
     848        psError(PS_ERR_UNKNOWN, true, "-warp_id is required");
    849849        return false;
    850850    }
     
    900900    }
    901901
    902     // XXX need to validate that this coresponds to an p4InputImfile
    903     if (!p4SkyfileInsert(config->dbh,
    904             (psS32)atoi(p4_id),
     902    // XXX need to validate that this coresponds to an warpInputImfile
     903    if (!warpSkyfileInsert(config->dbh,
     904            (psS32)atoi(warp_id),
    905905            skycell_id,
    906906            tess_id,
     
    916916    }
    917917
    918     if (!p4CompletedRuns(config)) {
     918    if (!warpCompletedRuns(config)) {
    919919        if (!psDBRollback(config->dbh)) {
    920920            psError(PS_ERR_UNKNOWN, false, "database error");
     
    933933}
    934934
    935 bool p4CompletedRuns(pxConfig *config)
     935bool warpCompletedRuns(pxConfig *config)
    936936{
    937937    PS_ASSERT_PTR_NON_NULL(config, false);
     
    945945    // modifying.
    946946    char *query =
    947         "UPDATE p4Run\n"
    948         "   SET p4Run.state = 'stop'\n"
     947        "UPDATE warpRun\n"
     948        "   SET warpRun.state = 'stop'\n"
    949949        " WHERE\n"
    950         "   p4Run.p4_id =\n"
     950        "   warpRun.warp_id =\n"
    951951        "   (SELECT DISTINCT\n"
    952         "       p4_id\n"
     952        "       warp_id\n"
    953953        "   FROM\n"
    954954        "       (SELECT DISTINCT\n"
    955         "           p4Run.p4_id,\n"
    956         "           p4SkyCellMap.p4_id as foo,\n"
    957         "           p4Skyfile.p4_id as bar\n"
    958         "       FROM p4Run\n"
    959         "       JOIN p4SkyCellMap\n"
    960         "           USING(p4_id)\n"
    961         "       LEFT JOIN p4Skyfile\n"
    962         "           USING(p4_id, skycell_id, tess_id)\n"
     955        "           warpRun.warp_id,\n"
     956        "           warpSkyCellMap.warp_id as foo,\n"
     957        "           warpSkyfile.warp_id as bar\n"
     958        "       FROM warpRun\n"
     959        "       JOIN warpSkyCellMap\n"
     960        "           USING(warp_id)\n"
     961        "       LEFT JOIN warpSkyfile\n"
     962        "           USING(warp_id, skycell_id, tess_id)\n"
    963963        "       WHERE\n"
    964         "           p4Run.state = 'run'\n"
     964        "           warpRun.state = 'run'\n"
    965965        "       GROUP BY\n"
    966         "           p4Run.p4_id\n" 
     966        "           warpRun.warp_id\n" 
    967967        "       HAVING\n"
    968         "       COUNT(p4SkyCellMap.p4_id) = COUNT(p4Skyfile.p4_id)\n"
     968        "       COUNT(warpSkyCellMap.warp_id) = COUNT(warpSkyfile.warp_id)\n"
    969969        "       ) as Foo\n"
    970970        "   )\n";
     
    978978    char *query =
    979979        "CREATE TEMPORARY TABLE finished\n"
    980         " (p4_id INT, PRIMARY KEY(p4_id)) ENGINE=MEMORY\n";
     980        " (warp_id INT, PRIMARY KEY(warp_id)) ENGINE=MEMORY\n";
    981981
    982982    if (!p_psDBRunQuery(config->dbh, query)) {
     
    990990        "INSERT INTO finished\n"
    991991        " SELECT\n"
    992         "   p4_id\n"
     992        "   warp_id\n"
    993993        " FROM\n"
    994994        "   (SELECT DISTINCT\n"
    995         "       p4Run.p4_id,\n"
    996         "       p4SkyCellMap.p4_id as foo,\n"
    997         "       p4Skyfile.p4_id as bar\n"
    998         "   FROM p4Run\n"
    999         "   JOIN p4SkyCellMap\n"
    1000         "       USING(p4_id)\n"
    1001         "   LEFT JOIN p4Skyfile\n"
    1002         "       USING(p4_id, skycell_id, tess_id)\n"
     995        "       warpRun.warp_id,\n"
     996        "       warpSkyCellMap.warp_id as foo,\n"
     997        "       warpSkyfile.warp_id as bar\n"
     998        "   FROM warpRun\n"
     999        "   JOIN warpSkyCellMap\n"
     1000        "       USING(warp_id)\n"
     1001        "   LEFT JOIN warpSkyfile\n"
     1002        "       USING(warp_id, skycell_id, tess_id)\n"
    10031003        "   WHERE\n"
    1004         "       p4Run.state = 'run'\n"
     1004        "       warpRun.state = 'run'\n"
    10051005        "   GROUP BY\n"
    1006         "       p4Run.p4_id\n" 
     1006        "       warpRun.warp_id\n" 
    10071007        "   HAVING\n"
    1008         "       COUNT(p4SkyCellMap.p4_id) = COUNT(p4Skyfile.p4_id)\n"
     1008        "       COUNT(warpSkyCellMap.warp_id) = COUNT(warpSkyfile.warp_id)\n"
    10091009        " ) as Foo \n";
    10101010
     
    10171017{   
    10181018    char *query =
    1019         "UPDATE p4Run\n"
    1020         "   SET p4Run.state = 'stop'\n"
     1019        "UPDATE warpRun\n"
     1020        "   SET warpRun.state = 'stop'\n"
    10211021        " WHERE\n"
    1022         "   p4Run.p4_id =\n"
     1022        "   warpRun.warp_id =\n"
    10231023        "   (SELECT DISTINCT\n"
    1024         "       p4_id\n"
     1024        "       warp_id\n"
    10251025        "   FROM finished\n"
    10261026        "   )\n";
     
    10501050    psString query = psStringCopy(
    10511051        "SELECT\n"
    1052         "   p4Skyfile.*\n"
    1053         " FROM p4Run\n"
    1054         " JOIN p4Skyfile\n"
    1055         "   USING(p4_id)\n"
     1052        "   warpSkyfile.*\n"
     1053        " FROM warpRun\n"
     1054        " JOIN warpSkyfile\n"
     1055        "   USING(warp_id)\n"
    10561056        " WHERE\n"
    1057         "   p4Run.state = 'run'\n"
     1057        "   warpRun.state = 'run'\n"
    10581058    );
    10591059
    10601060    if (config->where) {
    1061         psString whereClause = psDBGenerateWhereConditionSQL(config->where, "p4Skyfile");
     1061        psString whereClause = psDBGenerateWhereConditionSQL(config->where, "warpSkyfile");
    10621062        psStringAppend(&query, " AND %s", whereClause);
    10631063        psFree(whereClause);
     
    10931093    }
    10941094    if (!psArrayLength(output)) {
    1095         psError(PS_ERR_UNKNOWN, false, "no p4Skyfile rows found");
     1095        psError(PS_ERR_UNKNOWN, false, "no warpSkyfile rows found");
    10961096        psFree(output);
    10971097        return true;
     
    11101110    if (psArrayLength(output)) {
    11111111        // negative simple so the default is true
    1112         if (!ippdbPrintMetadatas(stdout, output, "p4Skyfile", !simple)) {
     1112        if (!ippdbPrintMetadatas(stdout, output, "warpSkyfile", !simple)) {
    11131113            psError(PS_ERR_UNKNOWN, false, "failed to print array");
    11141114            psFree(output);
     
    11231123
    11241124
    1125 static bool setp4RunState(pxConfig *config, const char *p4_id, const char *state)
    1126 {
    1127     PS_ASSERT_PTR_NON_NULL(p4_id, false);
     1125static bool setwarpRunState(pxConfig *config, const char *warp_id, const char *state)
     1126{
     1127    PS_ASSERT_PTR_NON_NULL(warp_id, false);
    11281128    PS_ASSERT_PTR_NON_NULL(state, false);
    11291129
     
    11361136    ) {
    11371137        psError(PS_ERR_UNKNOWN, false,
    1138                 "invalid p4Run state: %s", state);
    1139         return false;
    1140     }
    1141 
    1142     char *query = "UPDATE p4Run SET state = '%s' WHERE p4_id = '%s'";
    1143     if (!p_psDBRunQuery(config->dbh, query, state, p4_id)) {
     1138                "invalid warpRun state: %s", state);
     1139        return false;
     1140    }
     1141
     1142    char *query = "UPDATE warpRun SET state = '%s' WHERE warp_id = '%s'";
     1143    if (!p_psDBRunQuery(config->dbh, query, state, warp_id)) {
    11441144        psError(PS_ERR_UNKNOWN, false,
    1145                 "failed to change state for p4_id %s", p4_id);
     1145                "failed to change state for warp_id %s", warp_id);
    11461146        return false;
    11471147    }
Note: See TracChangeset for help on using the changeset viewer.