IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 23365


Ignore:
Timestamp:
Mar 17, 2009, 2:56:39 PM (17 years ago)
Author:
bills
Message:

add timestamp to distRun drop chip_id

File:
1 edited

Legend:

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

    r23256 r23365  
    9898    PXOPT_LOOKUP_STR(set_label, config->args, "-set_label", false, false);
    9999
    100     bool require_chip_id = false;
    101     if (!strcmp(stage, "raw")) {
    102         // need to know the chip id for raw stage so that we can find the masks
    103         require_chip_id = true;
    104     }
    105     PXOPT_LOOKUP_S64(chip_id, config->args, "-chip_id",  require_chip_id, false);
    106 
    107100    // TODO: check that stage has an expected value
     101    // XXX: all of the following concerns will be managed properly by definebyquery
     102
    108103    // TODO: check that stage_id actually exists for stage
    109104    // in magicdstool we queue off of a magic_id so the stage_id, exp_id, and cam_id get looked up
     
    113108    // change between the time that it is queued.
    114109
    115     if (!distRunInsert(config->dbh, 0, stage, stage_id, chip_id, set_label, outroot, clean, "new", 0)) {
     110    if (!distRunInsert(config->dbh, 0, stage, stage_id, set_label, outroot, clean, "new", NULL, 0)) {
    116111        psError(PS_ERR_UNKNOWN, false, "database error");
    117112        return false;
     
    151146    }
    152147
    153     psString query = psStringCopy("UPDATE distRun");
     148    psString query = psStringCopy("UPDATE distRun SET time_stamp = UTC_TIMESTAMP()");
    154149
    155150    if (state) {
    156         psStringAppend(&query, " SET state = '%s'", state);
     151        psStringAppend(&query, " , state = '%s'", state);
    157152    }
    158153
    159154    if (label) {
    160         psStringAppend(&query, " SET label = '%s'", label);
     155        psStringAppend(&query, " , label = '%s'", label);
    161156    }
    162157
    163158    if (code) {
    164         psStringAppend(&query, " SET fault = %d", code);
     159        psStringAppend(&query, " , fault = %d", code);
    165160    }
    166161
Note: See TracChangeset for help on using the changeset viewer.