Index: trunk/ippTools/src/pxwarp.c
===================================================================
--- trunk/ippTools/src/pxwarp.c	(revision 24487)
+++ trunk/ippTools/src/pxwarp.c	(revision 25835)
@@ -29,108 +29,15 @@
 #include "pxwarp.h"
 
-bool pxwarpRunSetState(pxConfig *config, psS64 warp_id, const char *state)
-{
-    PS_ASSERT_PTR_NON_NULL(config, false);
-    PS_ASSERT_PTR_NON_NULL(state, false);
-
-    // check that state is a valid string value
-    if (!pxIsValidState(state)) {
-        psError(PS_ERR_UNKNOWN, false, "invalid warpRun state: %s", state);
-        return false;
-    }
-
-    char *query = "UPDATE warpRun SET state = '%s' WHERE warp_id = %" PRId64;
-    if (!p_psDBRunQueryF(config->dbh, query, state, warp_id)) {
-        psError(PS_ERR_UNKNOWN, false,
-                "failed to change state for warp_id %" PRId64, warp_id);
-        return false;
-    }
-
-    return true;
-}
-
-
-bool pxwarpRunSetStateByQuery(pxConfig *config, psMetadata *where, const char *state)
-{
-    PS_ASSERT_PTR_NON_NULL(config, false);
-    PS_ASSERT_PTR_NON_NULL(state, false);
-
-    // check that state is a valid string value
-    if (!pxIsValidState(state)) {
-        psError(PS_ERR_UNKNOWN, false, "invalid warpRun state: %s", state);
-        return false;
-    }
-
-    psString query = psStringCopy("UPDATE warpRun JOIN fakeRun USING(fake_id) JOIN camRun USING(cam_id) JOIN chipRun USING(chip_id) JOIN rawExp USING(exp_id) SET warpRun.state = '%s'");
-
-    if (where) {
-        psString whereClause = psDBGenerateWhereSQL(where, NULL);
-        if (whereClause && strlen(whereClause) > 0) {
-            psStringAppend(&query, " %s", whereClause);
-        }
-        psFree(whereClause);
-    }
-
-    if (!p_psDBRunQueryF(config->dbh, query, state)) {
-        psFree(query);
-        psError(PS_ERR_UNKNOWN, false, "database error");
-        return false;
-    }
-
-    psFree(query);
-
-    return true;
-}
-
-
-bool pxwarpRunSetLabel(pxConfig *config, psS64 warp_id, const char *label)
-{
-    PS_ASSERT_PTR_NON_NULL(config, false);
-    // note label == NULL should be explicitly allowed
-
-    char *query = "UPDATE warpRun SET warpRun.label = '%s' WHERE warp_id = %" PRId64;
-    if (!p_psDBRunQueryF(config->dbh, query, label, warp_id)) {
-        psError(PS_ERR_UNKNOWN, false,
-                "failed to change label for warp_id %" PRId64, warp_id);
-        return false;
-    }
-
-    return true;
-}
-
-
-bool pxwarpRunSetLabelByQuery(pxConfig *config, psMetadata *where, const char *label)
-{
-    PS_ASSERT_PTR_NON_NULL(config, false);
-    // note label == NULL should be explicitly allowed
-
-    psString query = psStringCopy("UPDATE warpRun JOIN fakeRun USING(fake_id) JOIN camRun USING(cam_id) JOIN chipRun USING(chip_id) JOIN rawExp USING(exp_id) SET warpRun.label = '%s'");
-
-    if (where) {
-        psString whereClause = psDBGenerateWhereSQL(where, NULL);
-        psStringAppend(&query, " %s", whereClause);
-        psFree(whereClause);
-    }
-
-    if (!p_psDBRunQueryF(config->dbh, query, label)) {
-        psFree(query);
-        psError(PS_ERR_UNKNOWN, false, "database error");
-        return false;
-    }
-
-    psFree(query);
-
-    return true;
-}
-
-
 bool pxwarpQueueByFakeID(pxConfig *config,
                          psS64 fake_id,
                          const char *workdir,
                          const char *label,
+                         const char *data_group,
+                         const char *dist_group,
                          const char *dvodb,
                          const char *tess_id,
                          const char *reduction,
-                         const char *end_stage)
+                         const char *end_stage,
+                         const char *note)
 {
     PS_ASSERT_PTR_NON_NULL(config, false);
@@ -145,10 +52,13 @@
         "dirty",    // workdir_state
         label,
+        data_group,
+        dist_group,
         dvodb,
         tess_id,
-                       reduction,
+        reduction,
         end_stage,
         NULL,      // registered
-        0          // magicked zero when created will get updated when warpRun goes to 'full'
+        0,         // magicked set to zero when created may get updated when warpRun goes to 'full'
+        NULL        // note
     )) {
         psError(PS_ERR_UNKNOWN, false, "database error");
