IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 29, 2009, 6:15:31 PM (17 years ago)
Author:
beaumont
Message:

merged with head

Location:
branches/cnb_branches/cnb_branch_20090301
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/cnb_branches/cnb_branch_20090301

  • branches/cnb_branches/cnb_branch_20090301/ippTools/src

    • Property svn:ignore
      •  

        old new  
        3232flatcorr
        3333pstamptool
         34disttool
  • branches/cnb_branches/cnb_branch_20090301/ippTools/src/warptool.c

    r23352 r23594  
    157157            tess_id,
    158158            end_stage,
    159             registered
     159            registered,
     160            false       // magicked
    160161    );
    161162    if (!warpRun) {
     
    190191
    191192    psMetadata *where = psMetadataAlloc();
    192     PXOPT_COPY_S64(config->args, where, "-fake_id", "fakeRun.fake_id", "==");
    193     PXOPT_COPY_S64(config->args, where, "-cam_id", "camRun.cam_id", "==");
    194     PXOPT_COPY_S64(config->args, where, "-chip_id", "chipRun.chip_id", "==");
    195     PXOPT_COPY_S64(config->args, where, "-exp_id", "newExp.exp_id", "==");
    196     PXOPT_COPY_STR(config->args, where, "-exp_name", "exp_name", "==");
    197     PXOPT_COPY_STR(config->args, where, "-inst", "camera", "==");
    198     PXOPT_COPY_STR(config->args, where, "-telescope", "telescope", "==");
    199     PXOPT_COPY_TIME(config->args, where, "-dateobs_begin", "dateobs", ">=");
    200     PXOPT_COPY_TIME(config->args, where, "-dateobs_end", "dateobs", "<=");
    201     PXOPT_COPY_STR(config->args, where, "-exp_tag", "exp_tag", "==");
    202     PXOPT_COPY_STR(config->args, where, "-exp_type", "exp_type", "==");
    203     PXOPT_COPY_STR(config->args, where, "-filelevel", "filelevel", "==");
    204     PXOPT_COPY_STR(config->args, where, "-reduction", "reduction", "==");
    205     PXOPT_COPY_STR(config->args, where, "-filter", "filter", "==");
    206     PXOPT_COPY_F64(config->args, where, "-airmass_min", "airmass", ">=");
    207     PXOPT_COPY_F64(config->args, where, "-airmass_max", "airmass", "<");
    208     PXOPT_COPY_F64(config->args, where, "-ra_min", "ra", ">=");
    209     PXOPT_COPY_F64(config->args, where, "-ra_max", "ra", "<");
    210     PXOPT_COPY_F64(config->args, where, "-decl_min", "decl", ">=");
    211     PXOPT_COPY_F64(config->args, where, "-decl_max", "decl", "<");
    212     PXOPT_COPY_F32(config->args, where, "-exp_time_min", "exp_time", ">=");
    213     PXOPT_COPY_F32(config->args, where, "-exp_time_max", "exp_time", "<");
    214     PXOPT_COPY_F32(config->args, where, "-sat_pixel_frac_min", "sat_pixel_frac", ">=");
    215     PXOPT_COPY_F32(config->args, where, "-sat_pixel_frac_max", "sat_pixel_frac", "<");
    216     PXOPT_COPY_F64(config->args, where, "-bg_min", "bt", ">=");
    217     PXOPT_COPY_F64(config->args, where, "-bg_max", "bt", "<");
    218     PXOPT_COPY_F64(config->args, where, "-bg_stdev_min", "bg_stdev", ">=");
    219     PXOPT_COPY_F64(config->args, where, "-bg_stdev_max", "bg_stdev", "<");
    220     PXOPT_COPY_F64(config->args, where, "-bg_mean_stdev_min", "bg_mean_stdev", ">=");
    221     PXOPT_COPY_F64(config->args, where, "-bg_mean_stdev_max", "bg_mean_stdev", "<");
    222     PXOPT_COPY_F64(config->args, where, "-alt_min", "alt", ">=");
    223     PXOPT_COPY_F64(config->args, where, "-alt_max", "alt", "<");
    224     PXOPT_COPY_F64(config->args, where, "-az_min", "az", ">=");
    225     PXOPT_COPY_F64(config->args, where, "-az_max", "az", "<");
    226     PXOPT_COPY_F32(config->args, where, "-ccd_temp_min", "ccd_temp", ">=");
    227     PXOPT_COPY_F32(config->args, where, "-ccd_temp_max", "ccd_temp", "<");
    228     PXOPT_COPY_F64(config->args, where, "-posang_min", "posang", ">=");
    229     PXOPT_COPY_F64(config->args, where, "-posang_max", "posang", "<");
    230     PXOPT_COPY_STR(config->args, where, "-object", "object", "==");
    231     PXOPT_COPY_F32(config->args, where, "-solang_min", "solang", ">=");
    232     PXOPT_COPY_F32(config->args, where, "-solang_max", "solang", "<");
    233     PXOPT_COPY_STR(config->args, where, "-label", "label", "==");
     193    pxwarpGetSearchArgs (config, where);
     194    PXOPT_COPY_STR(config->args, where, "-reduction", "fakeRun.reduction", "==");
     195    PXOPT_COPY_STR(config->args, where, "-label",     "fakeRun.label",     "==");
    234196
    235197    if (!psListLength(where->list) &&
     
    337299
    338300    psMetadata *where = psMetadataAlloc();
    339     PXOPT_COPY_S64(config->args, where, "-warp_id", "warp_id", "==");
    340     PXOPT_COPY_S64(config->args, where, "-fake_id", "fake_id", "==");
    341     PXOPT_COPY_S64(config->args, where, "-chip_id", "chip_id", "==");
    342     PXOPT_COPY_S64(config->args, where, "-exp_id", "exp_id", "==");
    343     PXOPT_COPY_STR(config->args, where, "-exp_name", "exp_name", "==");
    344     PXOPT_COPY_STR(config->args, where, "-inst", "camera", "==");
    345     PXOPT_COPY_STR(config->args, where, "-telescope", "telescope", "==");
    346     PXOPT_COPY_TIME(config->args, where, "-dateobs_begin", "dateobs", ">=");
    347     PXOPT_COPY_TIME(config->args, where, "-dateobs_end", "dateobs", "<=");
    348     PXOPT_COPY_STR(config->args, where, "-exp_tag", "exp_tag", "==");
    349     PXOPT_COPY_STR(config->args, where, "-exp_type", "exp_type", "==");
    350     PXOPT_COPY_STR(config->args, where, "-filelevel", "filelevel", "==");
    351     PXOPT_COPY_STR(config->args, where, "-reduction", "reduction", "==");
    352     PXOPT_COPY_STR(config->args, where, "-filter", "filter", "==");
    353     PXOPT_COPY_F32(config->args, where, "-airmass_min", "airmass", ">=");
    354     PXOPT_COPY_F32(config->args, where, "-airmass_max", "airmass", "<");
    355     PXOPT_COPY_F64(config->args, where, "-ra_min", "ra", ">=");
    356     PXOPT_COPY_F64(config->args, where, "-ra_max", "ra", "<");
    357     PXOPT_COPY_F64(config->args, where, "-decl_min", "decl", ">=");
    358     PXOPT_COPY_F64(config->args, where, "-decl_max", "decl", "<");
    359     PXOPT_COPY_F32(config->args, where, "-exp_time_min", "exp_time", ">=");
    360     PXOPT_COPY_F32(config->args, where, "-exp_time_max", "exp_time", "<");
    361     PXOPT_COPY_F32(config->args, where, "-sat_pixel_frac_min", "sat_pixel_frac", ">=");
    362     PXOPT_COPY_F32(config->args, where, "-sat_pixel_frac_max", "sat_pixel_frac", "<");
    363     PXOPT_COPY_F64(config->args, where, "-bg_min", "bt", ">=");
    364     PXOPT_COPY_F64(config->args, where, "-bg_max", "bt", "<");
    365     PXOPT_COPY_F64(config->args, where, "-bg_stdev_min", "bg_stdev", ">=");
    366     PXOPT_COPY_F64(config->args, where, "-bg_stdev_max", "bg_stdev", "<");
    367     PXOPT_COPY_F64(config->args, where, "-bg_mean_stdev_min", "bg_mean_stdev", ">=");
    368     PXOPT_COPY_F64(config->args, where, "-bg_mean_stdev_max", "bg_mean_stdev", "<");
    369     PXOPT_COPY_F64(config->args, where, "-alt_min", "alt", ">=");
    370     PXOPT_COPY_F64(config->args, where, "-alt_max", "alt", "<");
    371     PXOPT_COPY_F64(config->args, where, "-az_min", "az", ">=");
    372     PXOPT_COPY_F64(config->args, where, "-az_max", "az", "<");
    373     PXOPT_COPY_F64(config->args, where, "-ccd_temp_min", "ccd_temp", ">=");
    374     PXOPT_COPY_F64(config->args, where, "-ccd_temp_max", "ccd_temp", "<");
    375     PXOPT_COPY_F64(config->args, where, "-posang_min", "posang", ">=");
    376     PXOPT_COPY_F64(config->args, where, "-posang_max", "posang", "<");
    377     PXOPT_COPY_STR(config->args, where, "-object", "object", "==");
    378     PXOPT_COPY_F32(config->args, where, "-solang_min", "solang", ">=");
    379     PXOPT_COPY_F32(config->args, where, "-solang_max", "solang", "<");
     301    pxwarpGetSearchArgs (config, where);
     302    PXOPT_COPY_S64(config->args, where, "-warp_id",   "warpRun.warp_id",   "==");
     303    PXOPT_COPY_STR(config->args, where, "-reduction", "warpRun.reduction", "==");
     304    PXOPT_COPY_STR(config->args, where, "-label",     "warpRun.label",     "==");
     305    PXOPT_COPY_STR(config->args, where, "-state",     "warpRun.state",     "==");
    380306
    381307    if (!psListLength(where->list)
     
    387313    }
    388314
    389     PXOPT_LOOKUP_STR(state, config->args, "-state", false, false);
    390     PXOPT_LOOKUP_STR(label, config->args, "-label", false, false);
     315    PXOPT_LOOKUP_STR(state, config->args, "-set_state", false, false);
     316    PXOPT_LOOKUP_STR(label, config->args, "-set_label", false, false);
    391317
    392318    if ((!state) && (!label)) {
     
    934860    PXOPT_LOOKUP_F32(good_frac, config->args, "-good_frac", false, false);
    935861    PXOPT_LOOKUP_BOOL(accept, config->args, "-accept", false);
     862    PXOPT_LOOKUP_BOOL(magicked, config->args, "-magicked", false);
    936863
    937864    // default values
     
    965892                           !accept,
    966893                           code,
    967                            0            // magic_ds_id
     894                           magicked
    968895        )) {
    969896        if (!psDBRollback(config->dbh)) {
     
    995922    PS_ASSERT_PTR_NON_NULL(config, false);
    996923
    997     // XXX this SQL has not been broken out to into seperate files as the MYSQL
    998     // < 5 & MYSQL 5 versions need to be kept in sync
    999 
    1000 #undef MYSQL5
    1001 #if MYSQL5
    1002     // XXX at MySQL 4.1.21 (probably all of 4.1.x) chokes and dies on this
    1003     // statement as it thinks it is trying to select from the table being
    1004     // updated. The 4.1 manual says that nested sub-queries are explicited
    1005     // allowed to do this with update statements as a temporary table is
    1006     // created so that you are not actually selecting from the table you are
    1007     // modifying.
    1008     char *query =
    1009         "UPDATE warpRun\n"
    1010         "   SET warpRun.state = 'stop'\n"
    1011         " WHERE\n"
    1012         "   warpRun.warp_id =\n"
    1013         "   (SELECT DISTINCT\n"
    1014         "       warp_id\n"
    1015         "   FROM\n"
    1016         "       (SELECT DISTINCT\n"
    1017         "           warpRun.warp_id,\n"
    1018         "           warpSkyCellMap.warp_id as foo,\n"
    1019         "           warpSkyfile.warp_id as bar\n"
    1020         "       FROM warpRun\n"
    1021         "       JOIN warpSkyCellMap\n"
    1022         "           USING(warp_id)\n"
    1023         "       LEFT JOIN warpSkyfile\n"
    1024         "           USING(warp_id, skycell_id, tess_id)\n"
    1025         "       WHERE\n"
    1026         "           warpRun.state = 'new'\n"
    1027         "       GROUP BY\n"
    1028         "           warpRun.warp_id\n"
    1029         "       HAVING\n"
    1030         "       COUNT(warpSkyCellMap.warp_id) = COUNT(warpSkyfile.warp_id)\n"
    1031         "       ) as Foo\n"
    1032         "   )\n";
     924    psString query = pxDataGet("warptool_finished_run_select.sql");
     925    if (!query) {
     926        psError(PXTOOLS_ERR_DATA, false, "failed to retrieve SQL statement");
     927        return false;
     928    }
    1033929
    1034930    if (!p_psDBRunQuery(config->dbh, query)) {
    1035931        psError(PS_ERR_UNKNOWN, false, "database error");
    1036         return false;
    1037     }
    1038 #else // if MYSQL5
    1039 {
    1040     char *query =
    1041         "CREATE TEMPORARY TABLE finished\n"
    1042         " (warp_id INT, PRIMARY KEY(warp_id)) ENGINE=MEMORY\n";
    1043 
    1044     if (!p_psDBRunQuery(config->dbh, query)) {
    1045         psError(PS_ERR_UNKNOWN, false, "database error");
    1046         return false;
    1047     }
    1048 }
    1049 
    1050 {
    1051     char *query =
    1052         "INSERT INTO finished\n"
    1053         " SELECT\n"
    1054         "   warp_id\n"
    1055         " FROM\n"
    1056         "   (SELECT DISTINCT\n"
    1057         "       warpRun.warp_id,\n"
    1058         "       warpSkyCellMap.warp_id as foo,\n"
    1059         "       warpSkyfile.warp_id as bar\n"
    1060         "   FROM warpRun\n"
    1061         "   JOIN warpSkyCellMap\n"
    1062         "       USING(warp_id)\n"
    1063         "   LEFT JOIN warpSkyfile\n"
    1064         "       USING(warp_id, skycell_id)\n"
    1065         "   WHERE\n"
    1066         "       warpRun.state = 'new'\n"
    1067         "   GROUP BY\n"
    1068         "       warpRun.warp_id\n"
    1069         "   HAVING\n"
    1070         "       COUNT(warpSkyCellMap.warp_id) = COUNT(warpSkyfile.warp_id)\n"
    1071         " ) as Foo \n";
    1072 
    1073     if (!p_psDBRunQuery(config->dbh, query)) {
    1074         psError(PS_ERR_UNKNOWN, false, "database error");
    1075         return false;
    1076     }
    1077 }
    1078 
    1079 {
    1080     char *query =
    1081         "UPDATE warpRun\n"
    1082         "   SET warpRun.state = 'full'\n"
    1083         " WHERE\n"
    1084         "   warpRun.warp_id =\n"
    1085         "   (SELECT DISTINCT\n"
    1086         "       warp_id\n"
    1087         "   FROM finished\n"
    1088         "   )\n";
    1089 
    1090     if (!p_psDBRunQuery(config->dbh, query)) {
    1091         psError(PS_ERR_UNKNOWN, false, "database error");
    1092         return false;
    1093     }
    1094 }
    1095 #endif // if MYSQL5
     932        psFree(query);
     933        return false;
     934    }
     935    psFree(query);
     936
     937    psArray *output = p_psDBFetchResult(config->dbh);
     938    if (!output) {
     939        psError(PS_ERR_UNKNOWN, false, "database error");
     940        return false;
     941    }
     942    if (!psArrayLength(output)) {
     943        psTrace("warptool", PS_LOG_INFO, "no rows found");
     944        psFree(output);
     945        return true;
     946    }
     947
     948    query = pxDataGet("warptool_finish_run.sql");
     949    for (long i = 0; i < psArrayLength(output); i++) {
     950        psMetadata *row = output->data[i];
     951
     952        bool status;
     953        psS64 warp_id = psMetadataLookupS64(&status, row, "warp_id");
     954        if (!status) {
     955            psError(PS_ERR_UNKNOWN, false, "failed to look up value for warp_id");
     956            psFree(output);
     957            psFree(query);
     958            return false;
     959        }
     960        psS32 magicked = psMetadataLookupS64(&status, row, "magicked");
     961        if (!status) {
     962            psError(PS_ERR_UNKNOWN, false, "failed to look up value for magicked");
     963            psFree(output);
     964            psFree(query);
     965            return false;
     966        }
     967        if (!p_psDBRunQueryF(config->dbh, query, magicked, warp_id)) {
     968            psError(PS_ERR_UNKNOWN, false, "database error");
     969            psFree(output);
     970            psFree(query);
     971            return false;
     972        }
     973
     974        psS64 numUpdated = psDBAffectedRows(config->dbh);
     975
     976        if (numUpdated != 1) {
     977            psError(PS_ERR_UNKNOWN, false, "should have affected 1 row");
     978            psFree(query);
     979            psFree(output);
     980            return false;
     981        }
     982    }
     983    psFree(output);
     984    psFree(query);
    1096985
    1097986    return true;
     
    11811070
    11821071    psMetadata *where = psMetadataAlloc();
    1183     PXOPT_COPY_S64(config->args, where, "-warp_id", "warpSkyfile.warp_id", "==");
     1072    pxwarpGetSearchArgs (config, where);
     1073    PXOPT_COPY_S64(config->args, where, "-warp_id",    "warpSkyfile.warp_id", "==");
    11841074    PXOPT_COPY_STR(config->args, where, "-skycell_id", "warpSkyfile.skycell_id", "==");
    1185     PXOPT_COPY_STR(config->args, where, "-tess_id", "warpSkyfile.tess_id", "==");
    1186     PXOPT_COPY_S64(config->args, where, "-fake_id", "fakeRun.fake_id", "==");
    1187     PXOPT_COPY_S64(config->args, where, "-chip_id", "chipRun.chip_id", "==");
    1188     PXOPT_COPY_S64(config->args, where, "-exp_id", "rawExp.exp_id", "==");
    1189 
    1190     PXOPT_COPY_STR(config->args, where, "-exp_name", "rawExp.exp_name", "==");
    1191     PXOPT_COPY_STR(config->args, where, "-label", "warpRun.label", "==");
    1192     PXOPT_COPY_STR(config->args, where, "-inst", "rawExp.camera", "==");
    1193     PXOPT_COPY_STR(config->args, where, "-telescope", "rawExp.telescope", "==");
    1194     PXOPT_COPY_TIME(config->args, where, "-dateobs_begin", "rawExp.dateobs", ">=");
    1195     PXOPT_COPY_TIME(config->args, where, "-dateobs_end", "rawExp.dateobs", "<=");
    1196     PXOPT_COPY_STR(config->args, where, "-exp_tag", "rawExp.exp_tag", "==");
    1197     PXOPT_COPY_STR(config->args, where, "-exp_type", "rawExp.exp_type", "==");
    1198     PXOPT_COPY_STR(config->args, where, "-filelevel", "rawExp.filelevel", "==");
    1199     PXOPT_COPY_STR(config->args, where, "-reduction", "rawExp.reduction", "==");
    1200     PXOPT_COPY_STR(config->args, where, "-filter", "rawExp.filter", "==");
    1201 
    1202     PXOPT_COPY_F32(config->args, where, "-airmass_min", "rawExp.airmass", ">=");
    1203     PXOPT_COPY_F32(config->args, where, "-airmass_max", "rawExp.airmass", "<");
    1204     PXOPT_COPY_F64(config->args, where, "-ra_min", "rawExp.ra", ">=");
    1205     PXOPT_COPY_F64(config->args, where, "-ra_max", "rawExp.ra", "<");
    1206     PXOPT_COPY_F64(config->args, where, "-decl_min", "rawExp.decl", ">=");
    1207     PXOPT_COPY_F64(config->args, where, "-decl_max", "rawExp.decl", "<");
    1208     PXOPT_COPY_F32(config->args, where, "-exp_time_min", "rawExp.exp_time", ">=");
    1209     PXOPT_COPY_F32(config->args, where, "-exp_time_max", "rawExp.exp_time", "<");
    1210     PXOPT_COPY_F32(config->args, where, "-sat_pixel_frac_min", "rawExp.sat_pixel_frac", ">=");
    1211     PXOPT_COPY_F32(config->args, where, "-sat_pixel_frac_max", "rawExp.sat_pixel_frac", "<");
    1212     PXOPT_COPY_F64(config->args, where, "-bg_min", "rawExp.bg", ">=");
    1213     PXOPT_COPY_F64(config->args, where, "-bg_max", "rawExp.bg", "<");
    1214     PXOPT_COPY_F64(config->args, where, "-bg_stdev_min", "rawExp.bg_stdev", ">=");
    1215     PXOPT_COPY_F64(config->args, where, "-bg_stdev_max", "rawExp.bg_stdev", "<");
    1216     PXOPT_COPY_F64(config->args, where, "-bg_mean_stdev_min", "rawExp.bg_mean_stdev", ">=");
    1217     PXOPT_COPY_F64(config->args, where, "-bg_mean_stdev_max", "rawExp.bg_mean_stdev", "<");
    1218     PXOPT_COPY_F64(config->args, where, "-alt_min", "rawExp.alt", ">=");
    1219     PXOPT_COPY_F64(config->args, where, "-alt_max", "rawExp.alt", "<");
    1220     PXOPT_COPY_F64(config->args, where, "-az_min", "rawExp.az", ">=");
    1221     PXOPT_COPY_F64(config->args, where, "-az_max", "rawExp.az", "<");
    1222     PXOPT_COPY_F64(config->args, where, "-ccd_temp_min", "rawExp.ccd_temp", ">=");
    1223     PXOPT_COPY_F64(config->args, where, "-ccd_temp_max", "rawExp.ccd_temp", "<");
    1224     PXOPT_COPY_F64(config->args, where, "-posang_min", "rawExp.posang", ">=");
    1225     PXOPT_COPY_F64(config->args, where, "-posang_max", "rawExp.posang", "<");
    1226     PXOPT_COPY_STR(config->args, where, "-object", "rawExp.object", "==");
    1227     PXOPT_COPY_F32(config->args, where, "-solang_min", "rawExp.solang", ">=");
    1228     PXOPT_COPY_F32(config->args, where, "-solang_max", "rawExp.solang", "<");
    1229     PXOPT_COPY_S16(config->args, where, "-code", "warpSkyfile.fault", "==");
     1075    PXOPT_COPY_STR(config->args, where, "-tess_id",    "warpSkyfile.tess_id", "==");
     1076    PXOPT_COPY_STR(config->args, where, "-reduction",  "rawExp.reduction", "==");
     1077    PXOPT_COPY_STR(config->args, where, "-label",      "warpRun.label", "==");
     1078    PXOPT_COPY_S16(config->args, where, "-code",       "warpSkyfile.fault", "==");
    12301079
    12311080    if (!psListLength(where->list)
     
    12461095    int numUpdated;                     // Number updated
    12471096    {
     1097        // This query is no longer necessary because we do not set warpRun's to full statte
     1098        // if they have faulted skyfiles.
     1099        // We do have runs in the DB that follow the old convention so we leave this in for
     1100        // now
    12481101        psString query = pxDataGet("warptool_revertwarped_update.sql");
    12491102        if (!query) {
     
    12731126        numUpdated = psDBAffectedRows(config->dbh);
    12741127
     1128#ifdef notdef
     1129        // new warpRuns won't get changed (they're already new) so don't require an update
    12751130        if (numUpdated < 1) {
    1276             psError(PS_ERR_UNKNOWN, false, "should have affected atleast 1 row");
     1131            psError(PS_ERR_UNKNOWN, false, "should have affected at least 1 row");
    12771132            if (!psDBRollback(config->dbh)) {
    12781133                psError(PS_ERR_UNKNOWN, false, "database error");
     
    12801135            return false;
    12811136        }
     1137#endif
    12821138    }
    12831139
     
    14621318    PS_ASSERT_PTR_NON_NULL(config, NULL);
    14631319
    1464     PXOPT_LOOKUP_S64(warp_id, config->args, "-warp_id", false, false);
     1320    PXOPT_LOOKUP_S64(warp_id, config->args, "-warp_id", true, false);
    14651321    PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false);
    14661322    PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false);
    14671323
    14681324    psMetadata *where = psMetadataAlloc();
    1469     if (warp_id) {
    1470         PXOPT_COPY_S64(config->args, where, "-warp_id", "warp_id", "==");
    1471     }
     1325    PXOPT_COPY_S64(config->args, where, "-warp_id", "warp_id", "==");
    14721326    PXOPT_COPY_STR(config->args, where, "-label", "label", "==");
    14731327
     
    16241478
    16251479    // note only updates if warpRun.state = run_state
    1626     if (!p_psDBRunQueryF(config->dbh, query, data_state, warp_id, skycell_id, run_state)) {
     1480    // XXX note that we have removed this constraint for now
     1481    if (!p_psDBRunQueryF(config->dbh, query, data_state, warp_id, skycell_id)) {
    16271482        psError(PS_ERR_UNKNOWN, false, "database error");
    16281483        // rollback
Note: See TracChangeset for help on using the changeset viewer.